ICU: Update to version 72.1

This commit is contained in:
bruvzg 2022-10-28 09:11:55 +03:00
parent 9ff3a43a32
commit 4e44a271f0
No known key found for this signature in database
GPG key ID: 7960FCF39844EC38
216 changed files with 8548 additions and 7566 deletions

View file

@ -193,40 +193,40 @@ int32_t UVector::elementAti(int32_t index) const {
UBool UVector::containsAll(const UVector& other) const {
for (int32_t i=0; i<other.size(); ++i) {
if (indexOf(other.elements[i]) < 0) {
return FALSE;
return false;
}
}
return TRUE;
return true;
}
UBool UVector::containsNone(const UVector& other) const {
for (int32_t i=0; i<other.size(); ++i) {
if (indexOf(other.elements[i]) >= 0) {
return FALSE;
return false;
}
}
return TRUE;
return true;
}
UBool UVector::removeAll(const UVector& other) {
UBool changed = FALSE;
UBool changed = false;
for (int32_t i=0; i<other.size(); ++i) {
int32_t j = indexOf(other.elements[i]);
if (j >= 0) {
removeElementAt(j);
changed = TRUE;
changed = true;
}
}
return changed;
}
UBool UVector::retainAll(const UVector& other) {
UBool changed = FALSE;
UBool changed = false;
for (int32_t j=size()-1; j>=0; --j) {
int32_t i = other.indexOf(elements[j]);
if (i < 0) {
removeElementAt(j);
changed = TRUE;
changed = true;
}
}
return changed;
@ -243,9 +243,9 @@ UBool UVector::removeElement(void* obj) {
int32_t i = indexOf(obj);
if (i >= 0) {
removeElementAt(i);
return TRUE;
return true;
}
return FALSE;
return false;
}
void UVector::removeAllElements(void) {
@ -263,12 +263,12 @@ UBool UVector::equals(const UVector &other) const {
int i;
if (this->count != other.count) {
return FALSE;
return false;
}
if (comparer == nullptr) {
for (i=0; i<count; i++) {
if (elements[i].pointer != other.elements[i].pointer) {
return FALSE;
return false;
}
}
} else {
@ -276,11 +276,11 @@ UBool UVector::equals(const UVector &other) const {
for (i=0; i<count; i++) {
key.pointer = &other.elements[i];
if (!(*comparer)(key, elements[i])) {
return FALSE;
return false;
}
}
}
return TRUE;
return true;
}
@ -525,7 +525,7 @@ sortiComparator(const void * /*context */, const void *left, const void *right)
void UVector::sorti(UErrorCode &ec) {
if (U_SUCCESS(ec)) {
uprv_sortArray(elements, count, sizeof(UElement),
sortiComparator, nullptr, FALSE, &ec);
sortiComparator, nullptr, false, &ec);
}
}
@ -547,7 +547,7 @@ void UVector::sorti(UErrorCode &ec) {
void UVector::sort(UElementComparator *compare, UErrorCode &ec) {
if (U_SUCCESS(ec)) {
uprv_sortArray(elements, count, sizeof(UElement),
sortComparator, &compare, FALSE, &ec);
sortComparator, &compare, false, &ec);
}
}
@ -558,7 +558,7 @@ void UVector::sort(UElementComparator *compare, UErrorCode &ec) {
void UVector::sortWithUComparator(UComparator *compare, const void *context, UErrorCode &ec) {
if (U_SUCCESS(ec)) {
uprv_sortArray(elements, count, sizeof(UElement),
compare, context, TRUE, &ec);
compare, context, true, &ec);
}
}