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/loclikely.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/loclikely.cpp')
-rw-r--r-- | thirdparty/icu4c/common/loclikely.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/thirdparty/icu4c/common/loclikely.cpp b/thirdparty/icu4c/common/loclikely.cpp index d80096b588..ec0dca28a4 100644 --- a/thirdparty/icu4c/common/loclikely.cpp +++ b/thirdparty/icu4c/common/loclikely.cpp @@ -201,7 +201,7 @@ createTagStringWithAlternates( **/ char tagBuffer[ULOC_FULLNAME_CAPACITY]; int32_t tagLength = 0; - UBool regionAppended = FALSE; + UBool regionAppended = false; if (langLength > 0) { appendTag( @@ -209,7 +209,7 @@ createTagStringWithAlternates( langLength, tagBuffer, &tagLength, - /*withSeparator=*/FALSE); + /*withSeparator=*/false); } else if (alternateTags == NULL) { /* @@ -246,7 +246,7 @@ createTagStringWithAlternates( alternateLangLength, tagBuffer, &tagLength, - /*withSeparator=*/FALSE); + /*withSeparator=*/false); } } @@ -256,7 +256,7 @@ createTagStringWithAlternates( scriptLength, tagBuffer, &tagLength, - /*withSeparator=*/TRUE); + /*withSeparator=*/true); } else if (alternateTags != NULL) { /* @@ -281,7 +281,7 @@ createTagStringWithAlternates( alternateScriptLength, tagBuffer, &tagLength, - /*withSeparator=*/TRUE); + /*withSeparator=*/true); } } @@ -291,9 +291,9 @@ createTagStringWithAlternates( regionLength, tagBuffer, &tagLength, - /*withSeparator=*/TRUE); + /*withSeparator=*/true); - regionAppended = TRUE; + regionAppended = true; } else if (alternateTags != NULL) { /* @@ -317,9 +317,9 @@ createTagStringWithAlternates( alternateRegionLength, tagBuffer, &tagLength, - /*withSeparator=*/TRUE); + /*withSeparator=*/true); - regionAppended = TRUE; + regionAppended = true; } } @@ -622,7 +622,7 @@ createLikelySubtagsString( likelySubtags, sink, err); - return TRUE; + return true; } } @@ -678,7 +678,7 @@ createLikelySubtagsString( likelySubtags, sink, err); - return TRUE; + return true; } } @@ -734,7 +734,7 @@ createLikelySubtagsString( likelySubtags, sink, err); - return TRUE; + return true; } } @@ -789,11 +789,11 @@ createLikelySubtagsString( likelySubtags, sink, err); - return TRUE; + return true; } } - return FALSE; + return false; error: @@ -801,7 +801,7 @@ error: *err = U_ILLEGAL_ARGUMENT_ERROR; } - return FALSE; + return false; } #define CHECK_TRAILING_VARIANT_SIZE(trailing, trailingLength) UPRV_BLOCK_MACRO_BEGIN { \ @@ -836,7 +836,7 @@ _uloc_addLikelySubtags(const char* localeID, const char* trailing = ""; int32_t trailingLength = 0; int32_t trailingIndex = 0; - UBool success = FALSE; + UBool success = false; if(U_FAILURE(*err)) { goto error; @@ -901,7 +901,7 @@ error: if (!U_FAILURE(*err)) { *err = U_ILLEGAL_ARGUMENT_ERROR; } - return FALSE; + return false; } // Add likely subtags to the sink @@ -925,7 +925,7 @@ _uloc_minimizeSubtags(const char* localeID, const char* trailing = ""; int32_t trailingLength = 0; int32_t trailingIndex = 0; - UBool successGetMax = FALSE; + UBool successGetMax = false; if(U_FAILURE(*err)) { goto error; @@ -1248,7 +1248,7 @@ _ulocimp_addLikelySubtags(const char* localeID, if (U_SUCCESS(*status)) { return _uloc_addLikelySubtags(localeBuffer.getBuffer(), sink, status); } else { - return FALSE; + return false; } } @@ -1320,14 +1320,14 @@ uloc_isRightToLeft(const char *locale) { char lang[8]; int32_t langLength = uloc_getLanguage(locale, lang, UPRV_LENGTHOF(lang), &errorCode); if (U_FAILURE(errorCode) || errorCode == U_STRING_NOT_TERMINATED_WARNING) { - return FALSE; + return false; } if (langLength > 0) { const char* langPtr = uprv_strstr(LANG_DIR_STRING, lang); if (langPtr != NULL) { switch (langPtr[langLength]) { - case '-': return FALSE; - case '+': return TRUE; + case '-': return false; + case '+': return true; default: break; // partial match of a longer code } } @@ -1340,12 +1340,12 @@ uloc_isRightToLeft(const char *locale) { ulocimp_addLikelySubtags(locale, sink, &errorCode); } if (U_FAILURE(errorCode) || errorCode == U_STRING_NOT_TERMINATED_WARNING) { - return FALSE; + return false; } scriptLength = uloc_getScript(likely.data(), script, UPRV_LENGTHOF(script), &errorCode); if (U_FAILURE(errorCode) || errorCode == U_STRING_NOT_TERMINATED_WARNING || scriptLength == 0) { - return FALSE; + return false; } } UScriptCode scriptCode = (UScriptCode)u_getPropertyValueEnum(UCHAR_SCRIPT, script); @@ -1392,7 +1392,7 @@ ulocimp_getRegionForSupplementalData(const char *localeID, UBool inferRegion, if (U_FAILURE(*status)) { rgLen = 0; } else if (rgLen == 0 && inferRegion) { - // no unicode_region_subtag but inferRegion TRUE, try likely subtags + // no unicode_region_subtag but inferRegion true, try likely subtags rgStatus = U_ZERO_ERROR; icu::CharString locBuf; { |