aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/icu/i18n/rbnf.cpp
diff options
context:
space:
mode:
authorromankoshelev <romankoshelev@yandex-team.com>2024-05-13 11:00:27 +0300
committerromankoshelev <romankoshelev@yandex-team.com>2024-05-13 11:13:05 +0300
commit5b22fadb0f035a3b82c328e0ae710ad2b92f6eac (patch)
treee15dc649c79c4fb78f35cd6694dfe9af9bfcc0ad /contrib/libs/icu/i18n/rbnf.cpp
parent5946aa7d3cbca62f6bcf074e8a2b9346e7a96af4 (diff)
downloadydb-5b22fadb0f035a3b82c328e0ae710ad2b92f6eac.tar.gz
Update ICU to 75.1
904da4ae1c86fc5542eac7f1cd18d97b72eb8517
Diffstat (limited to 'contrib/libs/icu/i18n/rbnf.cpp')
-rw-r--r--contrib/libs/icu/i18n/rbnf.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/contrib/libs/icu/i18n/rbnf.cpp b/contrib/libs/icu/i18n/rbnf.cpp
index 06599b4fd1..a30b945909 100644
--- a/contrib/libs/icu/i18n/rbnf.cpp
+++ b/contrib/libs/icu/i18n/rbnf.cpp
@@ -1037,7 +1037,7 @@ RuleBasedNumberFormat::getNumberOfRuleSetDisplayNameLocales() const {
Locale
RuleBasedNumberFormat::getRuleSetDisplayNameLocale(int32_t index, UErrorCode& status) const {
if (U_FAILURE(status)) {
- return Locale("");
+ return {""};
}
if (localizations && index >= 0 && index < localizations->getNumberOfDisplayLocales()) {
UnicodeString name(true, localizations->getLocaleName(index), -1);
@@ -1048,7 +1048,7 @@ RuleBasedNumberFormat::getRuleSetDisplayNameLocale(int32_t index, UErrorCode& st
bp = (char *)uprv_malloc(cap);
if (bp == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
- return Locale("");
+ return {""};
}
}
name.extract(0, name.length(), bp, cap, UnicodeString::kInvariant);
@@ -1557,7 +1557,7 @@ RuleBasedNumberFormat::init(const UnicodeString& rules, LocalizationInfo* locali
// our rule list is an array of the appropriate size
fRuleSets = (NFRuleSet **)uprv_malloc((numRuleSets + 1) * sizeof(NFRuleSet *));
/* test for nullptr */
- if (fRuleSets == 0) {
+ if (fRuleSets == nullptr) {
status = U_MEMORY_ALLOCATION_ERROR;
return;
}
@@ -1923,10 +1923,7 @@ RuleBasedNumberFormat::adoptDecimalFormatSymbols(DecimalFormatSymbols* symbolsTo
return; // do not allow caller to set decimalFormatSymbols to nullptr
}
- if (decimalFormatSymbols != nullptr) {
- delete decimalFormatSymbols;
- }
-
+ delete decimalFormatSymbols;
decimalFormatSymbols = symbolsToAdopt;
{