You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 17:36:07 +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:
42
thirdparty/icu4c/common/ucasemap.cpp
vendored
42
thirdparty/icu4c/common/ucasemap.cpp
vendored
@@ -49,7 +49,7 @@ U_NAMESPACE_USE
|
||||
|
||||
UCaseMap::UCaseMap(const char *localeID, uint32_t opts, UErrorCode *pErrorCode) :
|
||||
#if !UCONFIG_NO_BREAK_ITERATION
|
||||
iter(NULL),
|
||||
iter(nullptr),
|
||||
#endif
|
||||
caseLocale(UCASE_LOC_UNKNOWN), options(opts) {
|
||||
ucasemap_setLocale(this, localeID, pErrorCode);
|
||||
@@ -64,15 +64,15 @@ UCaseMap::~UCaseMap() {
|
||||
U_CAPI UCaseMap * U_EXPORT2
|
||||
ucasemap_open(const char *locale, uint32_t options, UErrorCode *pErrorCode) {
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
UCaseMap *csm = new UCaseMap(locale, options, pErrorCode);
|
||||
if(csm==NULL) {
|
||||
if(csm==nullptr) {
|
||||
*pErrorCode = U_MEMORY_ALLOCATION_ERROR;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} else if (U_FAILURE(*pErrorCode)) {
|
||||
delete csm;
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return csm;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ ucasemap_setLocale(UCaseMap *csm, const char *locale, UErrorCode *pErrorCode) {
|
||||
if(U_FAILURE(*pErrorCode)) {
|
||||
return;
|
||||
}
|
||||
if (locale != NULL && *locale == 0) {
|
||||
if (locale != nullptr && *locale == 0) {
|
||||
csm->locale[0] = 0;
|
||||
csm->caseLocale = UCASE_LOC_ROOT;
|
||||
return;
|
||||
@@ -136,14 +136,14 @@ namespace {
|
||||
|
||||
/* append a full case mapping result, see UCASE_MAX_STRING_LENGTH */
|
||||
inline UBool
|
||||
appendResult(int32_t cpLength, int32_t result, const UChar *s,
|
||||
appendResult(int32_t cpLength, int32_t result, const char16_t *s,
|
||||
ByteSink &sink, uint32_t options, icu::Edits *edits, UErrorCode &errorCode) {
|
||||
U_ASSERT(U_SUCCESS(errorCode));
|
||||
|
||||
/* decode the result */
|
||||
if(result<0) {
|
||||
/* (not) original code point */
|
||||
if(edits!=NULL) {
|
||||
if(edits!=nullptr) {
|
||||
edits->addUnchanged(cpLength);
|
||||
}
|
||||
if((options & U_OMIT_UNCHANGED_TEXT) == 0) {
|
||||
@@ -292,7 +292,7 @@ void toLower(int32_t caseLocale, uint32_t options,
|
||||
break;
|
||||
}
|
||||
// slow path
|
||||
const UChar *s;
|
||||
const char16_t *s;
|
||||
if (caseLocale >= 0) {
|
||||
csc->cpStart = cpStart;
|
||||
csc->cpLimit = srcIndex;
|
||||
@@ -402,7 +402,7 @@ void toUpper(int32_t caseLocale, uint32_t options,
|
||||
// slow path
|
||||
csc->cpStart = cpStart;
|
||||
csc->cpLimit = srcIndex;
|
||||
const UChar *s;
|
||||
const char16_t *s;
|
||||
c = ucase_toFullUpper(c, utf8_caseContextIterator, csc, &s, caseLocale);
|
||||
if (c >= 0) {
|
||||
ByteSinkUtil::appendUnchanged(src + prev, cpStart - prev,
|
||||
@@ -580,7 +580,7 @@ ucasemap_internalUTF8ToTitle(
|
||||
if(c>=0) {
|
||||
csc.cpStart=titleStart;
|
||||
csc.cpLimit=titleLimit;
|
||||
const UChar *s;
|
||||
const char16_t *s;
|
||||
c=ucase_toFullTitle(c, utf8_caseContextIterator, &csc, &s, caseLocale);
|
||||
if (!appendResult(titleLimit-titleStart, c, s, sink, options, edits, errorCode)) {
|
||||
return;
|
||||
@@ -757,11 +757,11 @@ void toUpper(uint32_t options,
|
||||
int32_t newLength = (i2 - i) + numYpogegrammeni * 2; // 2 bytes per U+0399
|
||||
change |= oldLength != newLength;
|
||||
if (change) {
|
||||
if (edits != NULL) {
|
||||
if (edits != nullptr) {
|
||||
edits->addReplace(oldLength, newLength);
|
||||
}
|
||||
} else {
|
||||
if (edits != NULL) {
|
||||
if (edits != nullptr) {
|
||||
edits->addUnchanged(oldLength);
|
||||
}
|
||||
// Write unchanged text?
|
||||
@@ -783,8 +783,8 @@ void toUpper(uint32_t options,
|
||||
}
|
||||
}
|
||||
} else if(c>=0) {
|
||||
const UChar *s;
|
||||
c=ucase_toFullUpper(c, NULL, NULL, &s, UCASE_LOC_GREEK);
|
||||
const char16_t *s;
|
||||
c=ucase_toFullUpper(c, nullptr, nullptr, &s, UCASE_LOC_GREEK);
|
||||
if (!appendResult(nextIndex - i, c, s, sink, options, edits, errorCode)) {
|
||||
return;
|
||||
}
|
||||
@@ -891,8 +891,8 @@ ucasemap_mapUTF8(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_P
|
||||
return 0;
|
||||
}
|
||||
if( destCapacity<0 ||
|
||||
(dest==NULL && destCapacity>0) ||
|
||||
(src==NULL && srcLength!=0) || srcLength<-1
|
||||
(dest==nullptr && destCapacity>0) ||
|
||||
(src==nullptr && srcLength!=0) || srcLength<-1
|
||||
) {
|
||||
errorCode=U_ILLEGAL_ARGUMENT_ERROR;
|
||||
return 0;
|
||||
@@ -904,7 +904,7 @@ ucasemap_mapUTF8(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITERATOR_P
|
||||
}
|
||||
|
||||
/* check for overlapping source and destination */
|
||||
if( dest!=NULL &&
|
||||
if( dest!=nullptr &&
|
||||
((src>=dest && src<(dest+destCapacity)) ||
|
||||
(dest>=src && dest<(src+srcLength)))
|
||||
) {
|
||||
@@ -940,7 +940,7 @@ ucasemap_utf8ToLower(const UCaseMap *csm,
|
||||
csm->caseLocale, csm->options, UCASEMAP_BREAK_ITERATOR_NULL
|
||||
dest, destCapacity,
|
||||
src, srcLength,
|
||||
ucasemap_internalUTF8ToLower, NULL, *pErrorCode);
|
||||
ucasemap_internalUTF8ToLower, nullptr, *pErrorCode);
|
||||
}
|
||||
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
@@ -952,7 +952,7 @@ ucasemap_utf8ToUpper(const UCaseMap *csm,
|
||||
csm->caseLocale, csm->options, UCASEMAP_BREAK_ITERATOR_NULL
|
||||
dest, destCapacity,
|
||||
src, srcLength,
|
||||
ucasemap_internalUTF8ToUpper, NULL, *pErrorCode);
|
||||
ucasemap_internalUTF8ToUpper, nullptr, *pErrorCode);
|
||||
}
|
||||
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
@@ -964,7 +964,7 @@ ucasemap_utf8FoldCase(const UCaseMap *csm,
|
||||
UCASE_LOC_ROOT, csm->options, UCASEMAP_BREAK_ITERATOR_NULL
|
||||
dest, destCapacity,
|
||||
src, srcLength,
|
||||
ucasemap_internalUTF8Fold, NULL, *pErrorCode);
|
||||
ucasemap_internalUTF8Fold, nullptr, *pErrorCode);
|
||||
}
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
Reference in New Issue
Block a user