summaryrefslogtreecommitdiff
path: root/thirdparty/icu4c/common/localematcher.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-10-31 14:25:37 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-10-31 14:25:37 +0100
commitd43364e3cc3903385750241278caf312869b7cab (patch)
treee0d17f8d7a25552c7752ad1e0fc1c526f1c4c747 /thirdparty/icu4c/common/localematcher.cpp
parenta7f67d4a79106f9a72d5f266e05d7f0c6c71f276 (diff)
parent4e44a271f0cfd00f5d278fd3001f1750cf934e42 (diff)
Merge pull request #67968 from bruvzg/icu72.1
ICU: Update to version 72.1
Diffstat (limited to 'thirdparty/icu4c/common/localematcher.cpp')
-rw-r--r--thirdparty/icu4c/common/localematcher.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/thirdparty/icu4c/common/localematcher.cpp b/thirdparty/icu4c/common/localematcher.cpp
index 2cad708d99..2f8664b6f7 100644
--- a/thirdparty/icu4c/common/localematcher.cpp
+++ b/thirdparty/icu4c/common/localematcher.cpp
@@ -60,7 +60,7 @@ LocaleMatcher::Result::Result(LocaleMatcher::Result &&src) U_NOEXCEPT :
if (desiredIsOwned) {
src.desiredLocale = nullptr;
src.desiredIndex = -1;
- src.desiredIsOwned = FALSE;
+ src.desiredIsOwned = false;
}
}
@@ -82,7 +82,7 @@ LocaleMatcher::Result &LocaleMatcher::Result::operator=(LocaleMatcher::Result &&
if (desiredIsOwned) {
src.desiredLocale = nullptr;
src.desiredIndex = -1;
- src.desiredIsOwned = FALSE;
+ src.desiredIsOwned = false;
}
return *this;
}
@@ -287,10 +287,10 @@ LocaleMatcher::Builder &LocaleMatcher::Builder::internalSetThresholdDistance(int
#endif
UBool LocaleMatcher::Builder::copyErrorTo(UErrorCode &outErrorCode) const {
- if (U_FAILURE(outErrorCode)) { return TRUE; }
- if (U_SUCCESS(errorCode_)) { return FALSE; }
+ if (U_FAILURE(outErrorCode)) { return true; }
+ if (U_SUCCESS(errorCode_)) { return false; }
outErrorCode = errorCode_;
- return TRUE;
+ return true;
}
LocaleMatcher LocaleMatcher::Builder::build(UErrorCode &errorCode) const {
@@ -632,30 +632,30 @@ const Locale *LocaleMatcher::getBestMatchForListString(
LocaleMatcher::Result LocaleMatcher::getBestMatchResult(
const Locale &desiredLocale, UErrorCode &errorCode) const {
if (U_FAILURE(errorCode)) {
- return Result(nullptr, defaultLocale, -1, -1, FALSE);
+ return Result(nullptr, defaultLocale, -1, -1, false);
}
int32_t suppIndex = getBestSuppIndex(
getMaximalLsrOrUnd(likelySubtags, desiredLocale, errorCode),
nullptr, errorCode);
if (U_FAILURE(errorCode) || suppIndex < 0) {
- return Result(nullptr, defaultLocale, -1, -1, FALSE);
+ return Result(nullptr, defaultLocale, -1, -1, false);
} else {
- return Result(&desiredLocale, supportedLocales[suppIndex], 0, suppIndex, FALSE);
+ return Result(&desiredLocale, supportedLocales[suppIndex], 0, suppIndex, false);
}
}
LocaleMatcher::Result LocaleMatcher::getBestMatchResult(
Locale::Iterator &desiredLocales, UErrorCode &errorCode) const {
if (U_FAILURE(errorCode) || !desiredLocales.hasNext()) {
- return Result(nullptr, defaultLocale, -1, -1, FALSE);
+ return Result(nullptr, defaultLocale, -1, -1, false);
}
LocaleLsrIterator lsrIter(likelySubtags, desiredLocales, ULOCMATCH_TEMPORARY_LOCALES);
int32_t suppIndex = getBestSuppIndex(lsrIter.next(errorCode), &lsrIter, errorCode);
if (U_FAILURE(errorCode) || suppIndex < 0) {
- return Result(nullptr, defaultLocale, -1, -1, FALSE);
+ return Result(nullptr, defaultLocale, -1, -1, false);
} else {
return Result(lsrIter.orphanRemembered(), supportedLocales[suppIndex],
- lsrIter.getBestDesiredIndex(), suppIndex, TRUE);
+ lsrIter.getBestDesiredIndex(), suppIndex, true);
}
}