summaryrefslogtreecommitdiff
path: root/thirdparty/icu4c/common/uprops.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/icu4c/common/uprops.cpp')
-rw-r--r--thirdparty/icu4c/common/uprops.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/thirdparty/icu4c/common/uprops.cpp b/thirdparty/icu4c/common/uprops.cpp
index 5186a0c75c..26e950b876 100644
--- a/thirdparty/icu4c/common/uprops.cpp
+++ b/thirdparty/icu4c/common/uprops.cpp
@@ -49,7 +49,7 @@ U_NAMESPACE_USE
namespace {
-icu::UInitOnce gLayoutInitOnce = U_INITONCE_INITIALIZER;
+icu::UInitOnce gLayoutInitOnce {};
UDataMemory *gLayoutMemory = nullptr;
UCPTrie *gInpcTrie = nullptr; // Indic_Positional_Category
@@ -76,7 +76,7 @@ UBool U_CALLCONV uprops_cleanup() {
gMaxVoValue = 0;
gLayoutInitOnce.reset();
- return TRUE;
+ return true;
}
UBool U_CALLCONV
@@ -141,7 +141,7 @@ void U_CALLCONV ulayout_load(UErrorCode &errorCode) {
}
UBool ulayout_ensureData(UErrorCode &errorCode) {
- if (U_FAILURE(errorCode)) { return FALSE; }
+ if (U_FAILURE(errorCode)) { return false; }
umtx_initOnce(gLayoutInitOnce, &ulayout_load, errorCode);
return U_SUCCESS(errorCode);
}
@@ -188,7 +188,7 @@ static UBool isJoinControl(const BinaryProperty &/*prop*/, UChar32 c, UProperty
#if UCONFIG_NO_NORMALIZATION
static UBool hasFullCompositionExclusion(const BinaryProperty &, UChar32, UProperty) {
- return FALSE;
+ return false;
}
#else
static UBool hasFullCompositionExclusion(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) {
@@ -202,7 +202,7 @@ static UBool hasFullCompositionExclusion(const BinaryProperty &/*prop*/, UChar32
// UCHAR_NF*_INERT properties
#if UCONFIG_NO_NORMALIZATION
static UBool isNormInert(const BinaryProperty &, UChar32, UProperty) {
- return FALSE;
+ return false;
}
#else
static UBool isNormInert(const BinaryProperty &/*prop*/, UChar32 c, UProperty which) {
@@ -215,7 +215,7 @@ static UBool isNormInert(const BinaryProperty &/*prop*/, UChar32 c, UProperty wh
#if UCONFIG_NO_NORMALIZATION
static UBool changesWhenCasefolded(const BinaryProperty &, UChar32, UProperty) {
- return FALSE;
+ return false;
}
#else
static UBool changesWhenCasefolded(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) {
@@ -223,7 +223,7 @@ static UBool changesWhenCasefolded(const BinaryProperty &/*prop*/, UChar32 c, UP
UErrorCode errorCode=U_ZERO_ERROR;
const Normalizer2 *nfcNorm2=Normalizer2::getNFCInstance(errorCode);
if(U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
if(nfcNorm2->getDecomposition(c, nfd)) {
/* c has a decomposition */
@@ -237,7 +237,7 @@ static UBool changesWhenCasefolded(const BinaryProperty &/*prop*/, UChar32 c, UP
c=U_SENTINEL;
}
} else if(c<0) {
- return FALSE; /* protect against bad input */
+ return false; /* protect against bad input */
}
if(c>=0) {
/* single code point */
@@ -252,21 +252,21 @@ static UBool changesWhenCasefolded(const BinaryProperty &/*prop*/, UChar32 c, UP
U_FOLD_CASE_DEFAULT, &errorCode);
return (UBool)(U_SUCCESS(errorCode) &&
0!=u_strCompare(nfd.getBuffer(), nfd.length(),
- dest, destLength, FALSE));
+ dest, destLength, false));
}
}
#endif
#if UCONFIG_NO_NORMALIZATION
static UBool changesWhenNFKC_Casefolded(const BinaryProperty &, UChar32, UProperty) {
- return FALSE;
+ return false;
}
#else
static UBool changesWhenNFKC_Casefolded(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) {
UErrorCode errorCode=U_ZERO_ERROR;
const Normalizer2Impl *kcf=Normalizer2Factory::getNFKC_CFImpl(errorCode);
if(U_FAILURE(errorCode)) {
- return FALSE;
+ return false;
}
UnicodeString src(c);
UnicodeString dest;
@@ -277,8 +277,8 @@ static UBool changesWhenNFKC_Casefolded(const BinaryProperty &/*prop*/, UChar32
// Small destCapacity for NFKC_CF(c).
if(buffer.init(5, errorCode)) {
const UChar *srcArray=src.getBuffer();
- kcf->compose(srcArray, srcArray+src.length(), FALSE,
- TRUE, buffer, errorCode);
+ kcf->compose(srcArray, srcArray+src.length(), false,
+ true, buffer, errorCode);
}
}
return U_SUCCESS(errorCode) && dest!=src;
@@ -287,7 +287,7 @@ static UBool changesWhenNFKC_Casefolded(const BinaryProperty &/*prop*/, UChar32
#if UCONFIG_NO_NORMALIZATION
static UBool isCanonSegmentStarter(const BinaryProperty &, UChar32, UProperty) {
- return FALSE;
+ return false;
}
#else
static UBool isCanonSegmentStarter(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) {
@@ -416,7 +416,7 @@ u_hasBinaryProperty(UChar32 c, UProperty which) {
/* c is range-checked in the functions that are called from here */
if(which<UCHAR_BINARY_START || UCHAR_BINARY_LIMIT<=which) {
/* not a known binary property */
- return FALSE;
+ return false;
} else {
const BinaryProperty &prop=binProps[which];
return prop.contains(prop, c, which);
@@ -670,7 +670,7 @@ U_CAPI int32_t U_EXPORT2
u_getIntPropertyMaxValue(UProperty which) {
if(which<UCHAR_INT_START) {
if(UCHAR_BINARY_START<=which && which<UCHAR_BINARY_LIMIT) {
- return 1; // maximum TRUE for all binary properties
+ return 1; // maximum true for all binary properties
}
} else if(which<UCHAR_INT_LIMIT) {
const IntProperty &prop=intProps[which-UCHAR_INT_START];
@@ -812,7 +812,7 @@ u_getFC_NFKC_Closure(UChar32 c, UChar *dest, int32_t destCapacity, UErrorCode *p
if(folded1Length>UCASE_MAX_STRING_LENGTH) {
folded1String.setTo(folded1Length);
} else {
- folded1String.setTo(FALSE, folded1, folded1Length);
+ folded1String.setTo(false, folded1, folded1Length);
}
}
UnicodeString kc1=nfkc->normalize(folded1String, *pErrorCode);