Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/vector/vector_int.c

    rcdbfab0 r9a4e996  
    2727        vec.last = -1;
    2828        vec.capacity = reserve;
    29         vec.data = (int *)malloc( sizeof( int ) * reserve );
     29        vec.data = malloc( sizeof( int ) * reserve );
    3030}
    3131
     
    3333        vec.last = other.last;
    3434        vec.capacity = other.capacity;
    35         vec.data = (int *)malloc( sizeof( int ) * other.capacity );
     35        vec.data = malloc( sizeof( int ) * other.capacity );
    3636        for (int i = 0; i < vec.last; i++) {
    3737                vec.data[i] = other.data[i];
     
    4545void reserve( vector_int *vec, int reserve ) {
    4646        if ( reserve > vec->capacity ) {
    47                 vec->data = (int *)realloc( vec->data, sizeof( int ) * reserve );
     47                vec->data = realloc( vec->data, sizeof( int ) * reserve );
    4848                vec->capacity = reserve;
    4949        }
     
    5454        if ( vec->last == vec->capacity ) {
    5555                vec->capacity *= 2;
    56                 vec->data = (int *)realloc( vec->data, sizeof( int ) * vec->capacity );
     56                vec->data = realloc( vec->data, sizeof( int ) * vec->capacity );
    5757        }
    5858        vec->data[ vec->last ] = element;
Note: See TracChangeset for help on using the changeset viewer.