diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-31 14:25:37 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-31 14:25:37 +0100 |
commit | d43364e3cc3903385750241278caf312869b7cab (patch) | |
tree | e0d17f8d7a25552c7752ad1e0fc1c526f1c4c747 /thirdparty/icu4c/common/uvectr64.cpp | |
parent | a7f67d4a79106f9a72d5f266e05d7f0c6c71f276 (diff) | |
parent | 4e44a271f0cfd00f5d278fd3001f1750cf934e42 (diff) |
Merge pull request #67968 from bruvzg/icu72.1
ICU: Update to version 72.1
Diffstat (limited to 'thirdparty/icu4c/common/uvectr64.cpp')
-rw-r--r-- | thirdparty/icu4c/common/uvectr64.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/thirdparty/icu4c/common/uvectr64.cpp b/thirdparty/icu4c/common/uvectr64.cpp index 57315c00ff..8bd5cd7839 100644 --- a/thirdparty/icu4c/common/uvectr64.cpp +++ b/thirdparty/icu4c/common/uvectr64.cpp @@ -117,22 +117,22 @@ void UVector64::removeAllElements(void) { UBool UVector64::expandCapacity(int32_t minimumCapacity, UErrorCode &status) { if (U_FAILURE(status)) { - return FALSE; + return false; } if (minimumCapacity < 0) { status = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } if (capacity >= minimumCapacity) { - return TRUE; + return true; } if (maxCapacity>0 && minimumCapacity>maxCapacity) { status = U_BUFFER_OVERFLOW_ERROR; - return FALSE; + return false; } if (capacity > (INT32_MAX - 1) / 2) { // integer overflow check status = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } int32_t newCap = capacity * 2; if (newCap < minimumCapacity) { @@ -144,17 +144,17 @@ UBool UVector64::expandCapacity(int32_t minimumCapacity, UErrorCode &status) { if (newCap > (int32_t)(INT32_MAX / sizeof(int64_t))) { // integer overflow check // We keep the original memory contents on bad minimumCapacity/maxCapacity. status = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } int64_t* newElems = (int64_t *)uprv_realloc(elements, sizeof(int64_t)*newCap); if (newElems == NULL) { // We keep the original contents on the memory failure on realloc. status = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } elements = newElems; capacity = newCap; - return TRUE; + return true; } void UVector64::setMaxCapacity(int32_t limit) { |