src/array_list.c

changeset 1684
89a07d18f86c
parent 1658
71aa6e28a2d7
child 1695
d21cec66facc
equal deleted inserted replaced
1683:e5399c60ae96 1684:89a07d18f86c
110 110
111 // guarantee enough capacity 111 // guarantee enough capacity
112 if (array->capacity < req_capacity) { 112 if (array->capacity < req_capacity) {
113 const size_t new_capacity = cx_array_grow_capacity(array->capacity,req_capacity); 113 const size_t new_capacity = cx_array_grow_capacity(array->capacity,req_capacity);
114 if (cxReallocateArray(allocator, &array->data, new_capacity, elem_size)) { 114 if (cxReallocateArray(allocator, &array->data, new_capacity, elem_size)) {
115 return -1; // LCOV_EXCL_LINE 115 return -1;
116 } 116 }
117 array->capacity = new_capacity; 117 array->capacity = new_capacity;
118 } 118 }
119 119
120 // determine insert position 120 // determine insert position

mercurial