diff options
Diffstat (limited to 'thirdparty/icu4c/common/ucnv_bld.cpp')
-rw-r--r-- | thirdparty/icu4c/common/ucnv_bld.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/thirdparty/icu4c/common/ucnv_bld.cpp b/thirdparty/icu4c/common/ucnv_bld.cpp index d08eec7369..a0fbfe2d7f 100644 --- a/thirdparty/icu4c/common/ucnv_bld.cpp +++ b/thirdparty/icu4c/common/ucnv_bld.cpp @@ -200,7 +200,7 @@ static icu::UMutex cnvCacheMutex; static const char **gAvailableConverters = NULL; static uint16_t gAvailableConverterCount = 0; -static icu::UInitOnce gAvailableConvertersInitOnce = U_INITONCE_INITIALIZER; +static icu::UInitOnce gAvailableConvertersInitOnce {}; #if !U_CHARSET_IS_UTF8 @@ -254,7 +254,7 @@ static UBool U_CALLCONV ucnv_cleanup(void) { #if !U_CHARSET_IS_UTF8 gDefaultConverterName = NULL; gDefaultConverterNameBuffer[0] = 0; - gDefaultConverterContainsOption = FALSE; + gDefaultConverterContainsOption = false; gDefaultAlgorithmicSharedData = NULL; #endif @@ -318,7 +318,7 @@ ucnv_data_unFlattenClone(UConverterLoadArgs *pArgs, UDataMemory *pData, UErrorCo data->staticData = source; - data->sharedDataCached = FALSE; + data->sharedDataCached = false; /* fill in fields from the loaded data */ data->dataMemory = (void*)pData; /* for future use */ @@ -462,7 +462,7 @@ ucnv_shareConverterData(UConverterSharedData * data) */ /* Mark it shared */ - data->sharedDataCached = TRUE; + data->sharedDataCached = true; uhash_put(SHARED_DATA_HASHTABLE, (void*) data->staticData->name, /* Okay to cast away const as long as @@ -502,11 +502,11 @@ ucnv_getSharedConverterData(const char *name) */ /* Deletes (frees) the Shared data it's passed. first it checks the referenceCounter to * see if anyone is using it, if not it frees all the memory stemming from sharedConverterData and - * returns TRUE, - * otherwise returns FALSE + * returns true, + * otherwise returns false * @param sharedConverterData The shared data * @return if not it frees all the memory stemming from sharedConverterData and - * returns TRUE, otherwise returns FALSE + * returns true, otherwise returns false */ static UBool ucnv_deleteSharedConverterData(UConverterSharedData * deadSharedData) @@ -515,8 +515,8 @@ ucnv_deleteSharedConverterData(UConverterSharedData * deadSharedData) UTRACE_DATA2(UTRACE_OPEN_CLOSE, "unload converter %s shared data %p", deadSharedData->staticData->name, deadSharedData); if (deadSharedData->referenceCounter > 0) { - UTRACE_EXIT_VALUE((int32_t)FALSE); - return FALSE; + UTRACE_EXIT_VALUE((int32_t)false); + return false; } if (deadSharedData->impl->unload != NULL) { @@ -531,8 +531,8 @@ ucnv_deleteSharedConverterData(UConverterSharedData * deadSharedData) uprv_free(deadSharedData); - UTRACE_EXIT_VALUE((int32_t)TRUE); - return TRUE; + UTRACE_EXIT_VALUE((int32_t)true); + return true; } /** @@ -589,7 +589,7 @@ ucnv_unload(UConverterSharedData *sharedData) { sharedData->referenceCounter--; } - if((sharedData->referenceCounter <= 0)&&(sharedData->sharedDataCached == FALSE)) { + if((sharedData->referenceCounter <= 0)&&(sharedData->sharedDataCached == false)) { ucnv_deleteSharedConverterData(sharedData); } } @@ -703,10 +703,10 @@ parseConverterOptions(const char *inName, /*Logic determines if the converter is Algorithmic AND/OR cached *depending on that: - * -we either go to get data from disk and cache it (Data=TRUE, Cached=False) - * -Get it from a Hashtable (Data=X, Cached=TRUE) - * -Call dataConverter initializer (Data=TRUE, Cached=TRUE) - * -Call AlgorithmicConverter initializer (Data=FALSE, Cached=TRUE) + * -we either go to get data from disk and cache it (Data=true, Cached=false) + * -Get it from a Hashtable (Data=X, Cached=true) + * -Call dataConverter initializer (Data=true, Cached=true) + * -Call AlgorithmicConverter initializer (Data=false, Cached=true) */ U_CFUNC UConverterSharedData * ucnv_loadSharedData(const char *converterName, @@ -717,8 +717,8 @@ ucnv_loadSharedData(const char *converterName, UConverterLoadArgs stackArgs; UConverterSharedData *mySharedConverterData = NULL; UErrorCode internalErrorCode = U_ZERO_ERROR; - UBool mayContainOption = TRUE; - UBool checkForAlgorithmic = TRUE; + UBool mayContainOption = true; + UBool checkForAlgorithmic = true; if (U_FAILURE (*err)) { return NULL; @@ -762,7 +762,7 @@ ucnv_loadSharedData(const char *converterName, return NULL; } mySharedConverterData = (UConverterSharedData *)gDefaultAlgorithmicSharedData; - checkForAlgorithmic = FALSE; + checkForAlgorithmic = false; mayContainOption = gDefaultConverterContainsOption; /* the default converter name is already canonical */ #endif @@ -866,7 +866,7 @@ ucnv_canCreateConverter(const char *converterName, UErrorCode *err) { if(U_SUCCESS(*err)) { UTRACE_DATA1(UTRACE_OPEN_CLOSE, "test if can open converter %s", converterName); - stackArgs.onlyTestIsLoadable=TRUE; + stackArgs.onlyTestIsLoadable=true; mySharedConverterData = ucnv_loadSharedData(converterName, &stackPieces, &stackArgs, err); ucnv_createConverterFromSharedData( &myUConverter, mySharedConverterData, @@ -989,15 +989,15 @@ ucnv_createConverterFromSharedData(UConverter *myUConverter, ucnv_unloadSharedDataIfReady(mySharedConverterData); return NULL; } - isCopyLocal = FALSE; + isCopyLocal = false; } else { - isCopyLocal = TRUE; + isCopyLocal = true; } /* initialize the converter */ uprv_memset(myUConverter, 0, sizeof(UConverter)); myUConverter->isCopyLocal = isCopyLocal; - /*myUConverter->isExtraLocal = FALSE;*/ /* Set by the memset call */ + /*myUConverter->isExtraLocal = false;*/ /* Set by the memset call */ myUConverter->sharedData = mySharedConverterData; myUConverter->options = pArgs->options; if(!pArgs->onlyTestIsLoadable) { @@ -1083,7 +1083,7 @@ ucnv_flushCache () UCNV_DEBUG_LOG("del",mySharedData->staticData->name,mySharedData); uhash_removeElement(SHARED_DATA_HASHTABLE, e); - mySharedData->sharedDataCached = FALSE; + mySharedData->sharedDataCached = false; ucnv_deleteSharedConverterData (mySharedData); } else { ++remaining; @@ -1342,7 +1342,7 @@ ucnv_swap(const UDataSwapper *ds, _MBCSHeader *outMBCSHeader; _MBCSHeader mbcsHeader; uint32_t mbcsHeaderLength; - UBool noFromU=FALSE; + UBool noFromU=false; uint8_t outputType; |