diff options
author | romankoshelev <romankoshelev@yandex-team.com> | 2024-05-13 11:00:27 +0300 |
---|---|---|
committer | romankoshelev <romankoshelev@yandex-team.com> | 2024-05-13 11:13:05 +0300 |
commit | 5b22fadb0f035a3b82c328e0ae710ad2b92f6eac (patch) | |
tree | e15dc649c79c4fb78f35cd6694dfe9af9bfcc0ad /contrib/libs/icu/i18n/numrange_fluent.cpp | |
parent | 5946aa7d3cbca62f6bcf074e8a2b9346e7a96af4 (diff) | |
download | ydb-5b22fadb0f035a3b82c328e0ae710ad2b92f6eac.tar.gz |
Update ICU to 75.1
904da4ae1c86fc5542eac7f1cd18d97b72eb8517
Diffstat (limited to 'contrib/libs/icu/i18n/numrange_fluent.cpp')
-rw-r--r-- | contrib/libs/icu/i18n/numrange_fluent.cpp | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/contrib/libs/icu/i18n/numrange_fluent.cpp b/contrib/libs/icu/i18n/numrange_fluent.cpp index 0944f3024f..e03701788c 100644 --- a/contrib/libs/icu/i18n/numrange_fluent.cpp +++ b/contrib/libs/icu/i18n/numrange_fluent.cpp @@ -212,6 +212,14 @@ UnlocalizedNumberRangeFormatter::UnlocalizedNumberRangeFormatter(NFS<UNF>&& src) // No additional fields to assign } +UnlocalizedNumberRangeFormatter::UnlocalizedNumberRangeFormatter(const impl::RangeMacroProps ¯os) { + fMacros = macros; +} + +UnlocalizedNumberRangeFormatter::UnlocalizedNumberRangeFormatter(impl::RangeMacroProps &¯os) { + fMacros = macros; +} + UnlocalizedNumberRangeFormatter& UnlocalizedNumberRangeFormatter::operator=(const UNF& other) { NFS<UNF>::operator=(static_cast<const NFS<UNF>&>(other)); // No additional fields to assign @@ -286,13 +294,26 @@ LocalizedNumberRangeFormatter UnlocalizedNumberRangeFormatter::locale(const Loca } +UnlocalizedNumberRangeFormatter LocalizedNumberRangeFormatter::withoutLocale() const & { + RangeMacroProps macros(fMacros); + macros.locale = Locale(); + return UnlocalizedNumberRangeFormatter(macros); +} + +UnlocalizedNumberRangeFormatter LocalizedNumberRangeFormatter::withoutLocale() && { + RangeMacroProps macros(std::move(fMacros)); + macros.locale = Locale(); + return UnlocalizedNumberRangeFormatter(std::move(macros)); +} + + FormattedNumberRange LocalizedNumberRangeFormatter::formatFormattableRange( const Formattable& first, const Formattable& second, UErrorCode& status) const { if (U_FAILURE(status)) { return FormattedNumberRange(U_ILLEGAL_ARGUMENT_ERROR); } - auto results = new UFormattedNumberRangeData(); + auto* results = new UFormattedNumberRangeData(); if (results == nullptr) { status = U_MEMORY_ALLOCATION_ERROR; return FormattedNumberRange(status); @@ -321,7 +342,7 @@ FormattedNumberRange LocalizedNumberRangeFormatter::formatFormattableRange( void LocalizedNumberRangeFormatter::formatImpl( UFormattedNumberRangeData& results, bool equalBeforeRounding, UErrorCode& status) const { - auto* impl = getFormatter(status); + const auto* impl = getFormatter(status); if (U_FAILURE(status)) { return; } |