mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
ICU: Update to version 72.1
This commit is contained in:
parent
9ff3a43a32
commit
4e44a271f0
216 changed files with 8548 additions and 7566 deletions
34
thirdparty/icu4c/common/uvector.cpp
vendored
34
thirdparty/icu4c/common/uvector.cpp
vendored
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue