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/simpleformatter.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/simpleformatter.cpp')
-rw-r--r-- | thirdparty/icu4c/common/simpleformatter.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/thirdparty/icu4c/common/simpleformatter.cpp b/thirdparty/icu4c/common/simpleformatter.cpp index f7f7aead61..01d3024cfc 100644 --- a/thirdparty/icu4c/common/simpleformatter.cpp +++ b/thirdparty/icu4c/common/simpleformatter.cpp @@ -65,7 +65,7 @@ UBool SimpleFormatter::applyPatternMinMaxArguments( int32_t min, int32_t max, UErrorCode &errorCode) { if (U_FAILURE(errorCode)) { - return FALSE; + return false; } // Parse consistent with MessagePattern, but // - support only simple numbered arguments @@ -76,7 +76,7 @@ UBool SimpleFormatter::applyPatternMinMaxArguments( compiledPattern.setTo((UChar)0); int32_t textLength = 0; int32_t maxArg = -1; - UBool inQuote = FALSE; + UBool inQuote = false; for (int32_t i = 0; i < patternLength;) { UChar c = patternBuffer[i++]; if (c == APOS) { @@ -85,12 +85,12 @@ UBool SimpleFormatter::applyPatternMinMaxArguments( ++i; } else if (inQuote) { // skip the quote-ending apostrophe - inQuote = FALSE; + inQuote = false; continue; } else if (c == OPEN_BRACE || c == CLOSE_BRACE) { // Skip the quote-starting apostrophe, find the end of the quoted literal text. ++i; - inQuote = TRUE; + inQuote = true; } else { // The apostrophe is part of literal text. c = APOS; @@ -123,7 +123,7 @@ UBool SimpleFormatter::applyPatternMinMaxArguments( } if (argNumber < 0 || c != CLOSE_BRACE) { errorCode = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } } if (argNumber > maxArg) { @@ -149,10 +149,10 @@ UBool SimpleFormatter::applyPatternMinMaxArguments( int32_t argCount = maxArg + 1; if (argCount < min || max < argCount) { errorCode = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } compiledPattern.setCharAt(0, (UChar)argCount); - return TRUE; + return true; } UnicodeString& SimpleFormatter::format( @@ -192,7 +192,7 @@ UnicodeString& SimpleFormatter::formatAndAppend( return appendTo; } return format(compiledPattern.getBuffer(), compiledPattern.length(), values, - appendTo, NULL, TRUE, + appendTo, NULL, true, offsets, offsetsLength, errorCode); } @@ -241,7 +241,7 @@ UnicodeString &SimpleFormatter::formatAndReplace( result.remove(); } return format(cp, cpLength, values, - result, &resultCopy, FALSE, + result, &resultCopy, false, offsets, offsetsLength, errorCode); } |