You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Update HarfBuzz, ICU and FreeType
HarfBuzz: Update to version 7.3.0 ICU4C: Update to version 73.1 FreeType: Update to version 2.13.0
This commit is contained in:
44
thirdparty/icu4c/common/uset.cpp
vendored
44
thirdparty/icu4c/common/uset.cpp
vendored
@@ -87,14 +87,14 @@ uset_addRange(USet* set, UChar32 start, UChar32 end) {
|
||||
}
|
||||
|
||||
U_CAPI void U_EXPORT2
|
||||
uset_addString(USet* set, const UChar* str, int32_t strLen) {
|
||||
uset_addString(USet* set, const char16_t* str, int32_t strLen) {
|
||||
// UnicodeString handles -1 for strLen
|
||||
UnicodeString s(strLen<0, str, strLen);
|
||||
((UnicodeSet*) set)->UnicodeSet::add(s);
|
||||
}
|
||||
|
||||
U_CAPI void U_EXPORT2
|
||||
uset_addAllCodePoints(USet* set, const UChar *str, int32_t strLen) {
|
||||
uset_addAllCodePoints(USet* set, const char16_t *str, int32_t strLen) {
|
||||
// UnicodeString handles -1 for strLen
|
||||
UnicodeString s(str, strLen);
|
||||
((UnicodeSet*) set)->UnicodeSet::addAll(s);
|
||||
@@ -111,13 +111,13 @@ uset_removeRange(USet* set, UChar32 start, UChar32 end) {
|
||||
}
|
||||
|
||||
U_CAPI void U_EXPORT2
|
||||
uset_removeString(USet* set, const UChar* str, int32_t strLen) {
|
||||
uset_removeString(USet* set, const char16_t* str, int32_t strLen) {
|
||||
UnicodeString s(strLen==-1, str, strLen);
|
||||
((UnicodeSet*) set)->UnicodeSet::remove(s);
|
||||
}
|
||||
|
||||
U_CAPI void U_EXPORT2
|
||||
uset_removeAllCodePoints(USet *set, const UChar *str, int32_t length) {
|
||||
uset_removeAllCodePoints(USet *set, const char16_t *str, int32_t length) {
|
||||
UnicodeString s(length==-1, str, length);
|
||||
((UnicodeSet*) set)->UnicodeSet::removeAll(s);
|
||||
}
|
||||
@@ -133,13 +133,13 @@ uset_retain(USet* set, UChar32 start, UChar32 end) {
|
||||
}
|
||||
|
||||
U_CAPI void U_EXPORT2
|
||||
uset_retainString(USet *set, const UChar *str, int32_t length) {
|
||||
uset_retainString(USet *set, const char16_t *str, int32_t length) {
|
||||
UnicodeString s(length==-1, str, length);
|
||||
((UnicodeSet*) set)->UnicodeSet::retain(s);
|
||||
}
|
||||
|
||||
U_CAPI void U_EXPORT2
|
||||
uset_retainAllCodePoints(USet *set, const UChar *str, int32_t length) {
|
||||
uset_retainAllCodePoints(USet *set, const char16_t *str, int32_t length) {
|
||||
UnicodeString s(length==-1, str, length);
|
||||
((UnicodeSet*) set)->UnicodeSet::retainAll(s);
|
||||
}
|
||||
@@ -165,13 +165,13 @@ uset_complementRange(USet *set, UChar32 start, UChar32 end) {
|
||||
}
|
||||
|
||||
U_CAPI void U_EXPORT2
|
||||
uset_complementString(USet *set, const UChar *str, int32_t length) {
|
||||
uset_complementString(USet *set, const char16_t *str, int32_t length) {
|
||||
UnicodeString s(length==-1, str, length);
|
||||
((UnicodeSet*) set)->UnicodeSet::complement(s);
|
||||
}
|
||||
|
||||
U_CAPI void U_EXPORT2
|
||||
uset_complementAllCodePoints(USet *set, const UChar *str, int32_t length) {
|
||||
uset_complementAllCodePoints(USet *set, const char16_t *str, int32_t length) {
|
||||
UnicodeString s(length==-1, str, length);
|
||||
((UnicodeSet*) set)->UnicodeSet::complementAll(s);
|
||||
}
|
||||
@@ -212,7 +212,7 @@ uset_containsRange(const USet* set, UChar32 start, UChar32 end) {
|
||||
}
|
||||
|
||||
U_CAPI UBool U_EXPORT2
|
||||
uset_containsString(const USet* set, const UChar* str, int32_t strLen) {
|
||||
uset_containsString(const USet* set, const char16_t* str, int32_t strLen) {
|
||||
UnicodeString s(strLen==-1, str, strLen);
|
||||
return ((const UnicodeSet*) set)->UnicodeSet::contains(s);
|
||||
}
|
||||
@@ -223,7 +223,7 @@ uset_containsAll(const USet* set1, const USet* set2) {
|
||||
}
|
||||
|
||||
U_CAPI UBool U_EXPORT2
|
||||
uset_containsAllCodePoints(const USet* set, const UChar *str, int32_t strLen) {
|
||||
uset_containsAllCodePoints(const USet* set, const char16_t *str, int32_t strLen) {
|
||||
// Create a string alias, since nothing is being added to the set.
|
||||
UnicodeString s(strLen==-1, str, strLen);
|
||||
return ((const UnicodeSet*) set)->UnicodeSet::containsAll(s);
|
||||
@@ -240,12 +240,12 @@ uset_containsSome(const USet* set1, const USet* set2) {
|
||||
}
|
||||
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
uset_span(const USet *set, const UChar *s, int32_t length, USetSpanCondition spanCondition) {
|
||||
uset_span(const USet *set, const char16_t *s, int32_t length, USetSpanCondition spanCondition) {
|
||||
return ((UnicodeSet*) set)->UnicodeSet::span(s, length, spanCondition);
|
||||
}
|
||||
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
uset_spanBack(const USet *set, const UChar *s, int32_t length, USetSpanCondition spanCondition) {
|
||||
uset_spanBack(const USet *set, const char16_t *s, int32_t length, USetSpanCondition spanCondition) {
|
||||
return ((UnicodeSet*) set)->UnicodeSet::spanBack(s, length, spanCondition);
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ uset_getItemCount(const USet* uset) {
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
uset_getItem(const USet* uset, int32_t itemIndex,
|
||||
UChar32* start, UChar32* end,
|
||||
UChar* str, int32_t strCapacity,
|
||||
char16_t* str, int32_t strCapacity,
|
||||
UErrorCode* ec) {
|
||||
if (U_FAILURE(*ec)) return 0;
|
||||
const UnicodeSet& set = *(const UnicodeSet*)uset;
|
||||
@@ -372,7 +372,7 @@ uset_getItem(const USet* uset, int32_t itemIndex,
|
||||
*/
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
uset_serialize(const USet* set, uint16_t* dest, int32_t destCapacity, UErrorCode* ec) {
|
||||
if (ec==NULL || U_FAILURE(*ec)) {
|
||||
if (ec==nullptr || U_FAILURE(*ec)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -383,10 +383,10 @@ U_CAPI UBool U_EXPORT2
|
||||
uset_getSerializedSet(USerializedSet* fillSet, const uint16_t* src, int32_t srcLength) {
|
||||
int32_t length;
|
||||
|
||||
if(fillSet==NULL) {
|
||||
if(fillSet==nullptr) {
|
||||
return false;
|
||||
}
|
||||
if(src==NULL || srcLength<=0) {
|
||||
if(src==nullptr || srcLength<=0) {
|
||||
fillSet->length=fillSet->bmpLength=0;
|
||||
return false;
|
||||
}
|
||||
@@ -415,7 +415,7 @@ uset_getSerializedSet(USerializedSet* fillSet, const uint16_t* src, int32_t srcL
|
||||
|
||||
U_CAPI void U_EXPORT2
|
||||
uset_setSerializedToOne(USerializedSet* fillSet, UChar32 c) {
|
||||
if(fillSet==NULL || (uint32_t)c>0x10ffff) {
|
||||
if(fillSet==nullptr || (uint32_t)c>0x10ffff) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ U_CAPI UBool U_EXPORT2
|
||||
uset_serializedContains(const USerializedSet* set, UChar32 c) {
|
||||
const uint16_t* array;
|
||||
|
||||
if(set==NULL || (uint32_t)c>0x10ffff) {
|
||||
if(set==nullptr || (uint32_t)c>0x10ffff) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -506,7 +506,7 @@ uset_serializedContains(const USerializedSet* set, UChar32 c) {
|
||||
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
uset_getSerializedRangeCount(const USerializedSet* set) {
|
||||
if(set==NULL) {
|
||||
if(set==nullptr) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -519,7 +519,7 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,
|
||||
const uint16_t* array;
|
||||
int32_t bmpLength, length;
|
||||
|
||||
if(set==NULL || rangeIndex<0 || pStart==NULL || pEnd==NULL) {
|
||||
if(set==nullptr || rangeIndex<0 || pStart==nullptr || pEnd==nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -590,7 +590,7 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,
|
||||
// addRemove(USet* set, UChar32 c, int32_t doRemove) {
|
||||
// int32_t i, length, more;
|
||||
//
|
||||
// if(set==NULL || (uint32_t)c>0x10ffff) {
|
||||
// if(set==nullptr || (uint32_t)c>0x10ffff) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
@@ -646,7 +646,7 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex,
|
||||
// /* reallocate */
|
||||
// int32_t newCapacity=set->capacity+set->capacity/2+USET_GROW_DELTA;
|
||||
// UChar32* newArray=(UChar32* )uprv_malloc(newCapacity*4);
|
||||
// if(newArray==NULL) {
|
||||
// if(newArray==nullptr) {
|
||||
// return false;
|
||||
// }
|
||||
// set->capacity=newCapacity;
|
||||
|
||||
Reference in New Issue
Block a user