Home
last modified time | relevance | path

Searched refs:newCap (Results 1 – 3 of 3) sorted by relevance

/external/icu4c/common/
Duvectr64.cpp132 int32_t newCap = capacity * 2; in expandCapacity() local
133 if (newCap < minimumCapacity) { in expandCapacity()
134 newCap = minimumCapacity; in expandCapacity()
136 if (maxCapacity > 0 && newCap > maxCapacity) { in expandCapacity()
137 newCap = maxCapacity; in expandCapacity()
139 if (newCap > (int32_t)(INT32_MAX / sizeof(int64_t))) { // integer overflow check in expandCapacity()
144 int64_t* newElems = (int64_t *)uprv_realloc(elements, sizeof(int64_t)*newCap); in expandCapacity()
151 capacity = newCap; in expandCapacity()
Duvectr32.cpp214 int32_t newCap = capacity * 2; in expandCapacity() local
215 if (newCap < minimumCapacity) { in expandCapacity()
216 newCap = minimumCapacity; in expandCapacity()
218 if (maxCapacity > 0 && newCap > maxCapacity) { in expandCapacity()
219 newCap = maxCapacity; in expandCapacity()
221 if (newCap > (int32_t)(INT32_MAX / sizeof(int32_t))) { // integer overflow check in expandCapacity()
226 int32_t* newElems = (int32_t *)uprv_realloc(elements, sizeof(int32_t)*newCap); in expandCapacity()
233 capacity = newCap; in expandCapacity()
Duvector.cpp338 int32_t newCap = capacity * 2; in ensureCapacity() local
339 if (newCap < minimumCapacity) { in ensureCapacity()
340 newCap = minimumCapacity; in ensureCapacity()
342 if (newCap > (int32_t)(INT32_MAX / sizeof(UHashTok))) { // integer overflow check in ensureCapacity()
347 UHashTok* newElems = (UHashTok *)uprv_realloc(elements, sizeof(UHashTok)*newCap); in ensureCapacity()
354 capacity = newCap; in ensureCapacity()