summaryrefslogtreecommitdiffstats
path: root/thirdparty/icu4c/common/resbund.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2024-05-14 11:41:19 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2024-05-14 12:38:52 +0300
commite74fea2864db7f8300da2a0569343b51666ecf4c (patch)
tree840169dd389ac4918f6be6f3906729a9052c9fcb /thirdparty/icu4c/common/resbund.cpp
parent557f63d03796db78255f055b6d06cb5f9195ff7e (diff)
downloadredot-engine-e74fea2864db7f8300da2a0569343b51666ecf4c.tar.gz
Update ICU to 75.1
Diffstat (limited to 'thirdparty/icu4c/common/resbund.cpp')
-rw-r--r--thirdparty/icu4c/common/resbund.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/thirdparty/icu4c/common/resbund.cpp b/thirdparty/icu4c/common/resbund.cpp
index 54383c981d..41337cdc15 100644
--- a/thirdparty/icu4c/common/resbund.cpp
+++ b/thirdparty/icu4c/common/resbund.cpp
@@ -179,7 +179,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ResourceBundle)
ResourceBundle::ResourceBundle(UErrorCode &err)
:UObject(), fLocale(nullptr)
{
- fResource = ures_open(0, Locale::getDefault().getName(), &err);
+ fResource = ures_open(nullptr, Locale::getDefault().getName(), &err);
}
ResourceBundle::ResourceBundle(const ResourceBundle &other)
@@ -188,7 +188,7 @@ ResourceBundle::ResourceBundle(const ResourceBundle &other)
UErrorCode status = U_ZERO_ERROR;
if (other.fResource) {
- fResource = ures_copyResb(0, other.fResource, &status);
+ fResource = ures_copyResb(nullptr, other.fResource, &status);
} else {
/* Copying a bad resource bundle */
fResource = nullptr;
@@ -199,7 +199,7 @@ ResourceBundle::ResourceBundle(UResourceBundle *res, UErrorCode& err)
:UObject(), fLocale(nullptr)
{
if (res) {
- fResource = ures_copyResb(0, res, &err);
+ fResource = ures_copyResb(nullptr, res, &err);
} else {
/* Copying a bad resource bundle */
fResource = nullptr;
@@ -218,7 +218,7 @@ ResourceBundle& ResourceBundle::operator=(const ResourceBundle& other)
if(this == &other) {
return *this;
}
- if(fResource != 0) {
+ if (fResource != nullptr) {
ures_close(fResource);
fResource = nullptr;
}
@@ -228,7 +228,7 @@ ResourceBundle& ResourceBundle::operator=(const ResourceBundle& other)
}
UErrorCode status = U_ZERO_ERROR;
if (other.fResource) {
- fResource = ures_copyResb(0, other.fResource, &status);
+ fResource = ures_copyResb(nullptr, other.fResource, &status);
} else {
/* Copying a bad resource bundle */
fResource = nullptr;
@@ -238,12 +238,10 @@ ResourceBundle& ResourceBundle::operator=(const ResourceBundle& other)
ResourceBundle::~ResourceBundle()
{
- if(fResource != 0) {
+ if (fResource != nullptr) {
ures_close(fResource);
}
- if(fLocale != nullptr) {
- delete(fLocale);
- }
+ delete fLocale;
}
ResourceBundle *
@@ -311,7 +309,7 @@ ResourceBundle ResourceBundle::getNext(UErrorCode& status) {
UnicodeString ResourceBundle::getNextString(UErrorCode& status) {
int32_t len = 0;
- const char16_t* r = ures_getNextString(fResource, &len, 0, &status);
+ const char16_t* r = ures_getNextString(fResource, &len, nullptr, &status);
return UnicodeString(true, r, len);
}