summaryrefslogtreecommitdiff
path: root/thirdparty/icu4c/common/characterproperties.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/characterproperties.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/characterproperties.cpp')
-rw-r--r--thirdparty/icu4c/common/characterproperties.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/thirdparty/icu4c/common/characterproperties.cpp b/thirdparty/icu4c/common/characterproperties.cpp
index a84996b47c..2316a391a3 100644
--- a/thirdparty/icu4c/common/characterproperties.cpp
+++ b/thirdparty/icu4c/common/characterproperties.cpp
@@ -36,11 +36,11 @@ namespace {
UBool U_CALLCONV characterproperties_cleanup();
-constexpr int32_t NUM_INCLUSIONS = UPROPS_SRC_COUNT + UCHAR_INT_LIMIT - UCHAR_INT_START;
+constexpr int32_t NUM_INCLUSIONS = UPROPS_SRC_COUNT + (UCHAR_INT_LIMIT - UCHAR_INT_START);
struct Inclusion {
UnicodeSet *fSet = nullptr;
- UInitOnce fInitOnce = U_INITONCE_INITIALIZER;
+ UInitOnce fInitOnce {};
};
Inclusion gInclusions[NUM_INCLUSIONS]; // cached getInclusions()
@@ -85,7 +85,7 @@ UBool U_CALLCONV characterproperties_cleanup() {
ucptrie_close(reinterpret_cast<UCPTrie *>(maps[i]));
maps[i] = nullptr;
}
- return TRUE;
+ return true;
}
void U_CALLCONV initInclusion(UPropertySource src, UErrorCode &errorCode) {
@@ -210,7 +210,7 @@ const UnicodeSet *getInclusionsForSource(UPropertySource src, UErrorCode &errorC
void U_CALLCONV initIntPropInclusion(UProperty prop, UErrorCode &errorCode) {
// This function is invoked only via umtx_initOnce().
U_ASSERT(UCHAR_INT_START <= prop && prop < UCHAR_INT_LIMIT);
- int32_t inclIndex = UPROPS_SRC_COUNT + prop - UCHAR_INT_START;
+ int32_t inclIndex = UPROPS_SRC_COUNT + (prop - UCHAR_INT_START);
U_ASSERT(gInclusions[inclIndex].fSet == nullptr);
UPropertySource src = uprops_getSource(prop);
const UnicodeSet *incl = getInclusionsForSource(src, errorCode);
@@ -255,7 +255,7 @@ const UnicodeSet *CharacterProperties::getInclusionsForProperty(
UProperty prop, UErrorCode &errorCode) {
if (U_FAILURE(errorCode)) { return nullptr; }
if (UCHAR_INT_START <= prop && prop < UCHAR_INT_LIMIT) {
- int32_t inclIndex = UPROPS_SRC_COUNT + prop - UCHAR_INT_START;
+ int32_t inclIndex = UPROPS_SRC_COUNT + (prop - UCHAR_INT_START);
Inclusion &i = gInclusions[inclIndex];
umtx_initOnce(i.fInitOnce, &initIntPropInclusion, prop, errorCode);
return i.fSet;