summaryrefslogtreecommitdiffstats
path: root/thirdparty/icu4c/common/locavailable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/icu4c/common/locavailable.cpp')
-rw-r--r--thirdparty/icu4c/common/locavailable.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/thirdparty/icu4c/common/locavailable.cpp b/thirdparty/icu4c/common/locavailable.cpp
index cf341e1f74..0ea2093988 100644
--- a/thirdparty/icu4c/common/locavailable.cpp
+++ b/thirdparty/icu4c/common/locavailable.cpp
@@ -35,7 +35,7 @@
U_NAMESPACE_BEGIN
-static icu::Locale* availableLocaleList = NULL;
+static icu::Locale* availableLocaleList = nullptr;
static int32_t availableLocaleListCount;
static icu::UInitOnce gInitOnceLocale {};
@@ -43,13 +43,13 @@ U_NAMESPACE_END
U_CDECL_BEGIN
-static UBool U_CALLCONV locale_available_cleanup(void)
+static UBool U_CALLCONV locale_available_cleanup()
{
U_NAMESPACE_USE
if (availableLocaleList) {
delete []availableLocaleList;
- availableLocaleList = NULL;
+ availableLocaleList = nullptr;
}
availableLocaleListCount = 0;
gInitOnceLocale.reset();
@@ -71,7 +71,7 @@ void U_CALLCONV locale_available_init() {
if(availableLocaleListCount) {
availableLocaleList = new Locale[availableLocaleListCount];
}
- if (availableLocaleList == NULL) {
+ if (availableLocaleList == nullptr) {
availableLocaleListCount= 0;
}
for (int32_t locCount=availableLocaleListCount-1; locCount>=0; --locCount) {
@@ -106,7 +106,7 @@ icu::UInitOnce ginstalledLocalesInitOnce {};
class AvailableLocalesSink : public ResourceSink {
public:
- void put(const char *key, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) U_OVERRIDE {
+ void put(const char *key, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) override {
ResourceTable resIndexTable = value.getTable(status);
if (U_FAILURE(status)) {
return;
@@ -196,7 +196,7 @@ class AvailableLocalesStringEnumeration : public StringEnumeration {
/* ### Get available **************************************************/
-static UBool U_CALLCONV uloc_cleanup(void) {
+static UBool U_CALLCONV uloc_cleanup() {
for (int32_t i = 0; i < UPRV_LENGTHOF(gAvailableLocaleNames); i++) {
uprv_free(gAvailableLocaleNames[i]);
gAvailableLocaleNames[i] = nullptr;
@@ -212,7 +212,7 @@ static UBool U_CALLCONV uloc_cleanup(void) {
static void U_CALLCONV loadInstalledLocales(UErrorCode& status) {
ucln_common_registerCleanup(UCLN_COMMON_ULOC, uloc_cleanup);
- icu::LocalUResourceBundlePointer rb(ures_openDirect(NULL, "res_index", &status));
+ icu::LocalUResourceBundlePointer rb(ures_openDirect(nullptr, "res_index", &status));
AvailableLocalesSink sink;
ures_getAllItemsWithFallback(rb.getAlias(), "", sink, status);
}