Skip to content

Temporary fix: rename function on number formatter to disambiguate #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion icuSources/i18n/measfmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ UnicodeString &MeasureFormat::formatNumeric(
}
number::LocalizedNumberFormatter numberFormatter2;
if (auto* lnf = numberFormatter->toNumberFormatter(status)) {
numberFormatter2 = lnf->integerWidth(number::IntegerWidth::zeroFillTo(2));
numberFormatter2 = lnf->_integerWidth(number::IntegerWidth::zeroFillTo(2));
} else {
return appendTo;
}
Expand Down
12 changes: 6 additions & 6 deletions icuSources/i18n/number_fluent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@ Derived NumberFormatterSettings<Derived>::grouping(UNumberGroupingStrategy strat
}

template<typename Derived>
Derived NumberFormatterSettings<Derived>::integerWidth(const IntegerWidth& style) const& {
Derived NumberFormatterSettings<Derived>::_integerWidth(const IntegerWidth& style) const& {
Derived copy(*this);
copy.fMacros.integerWidth = style;
return copy;
}

template<typename Derived>
Derived NumberFormatterSettings<Derived>::integerWidth(const IntegerWidth& style)&& {
Derived NumberFormatterSettings<Derived>::_integerWidth(const IntegerWidth& style)&& {
Derived move(std::move(*this));
move.fMacros.integerWidth = style;
return move;
Expand Down Expand Up @@ -362,14 +362,14 @@ Derived NumberFormatterSettings<Derived>::threshold(int32_t threshold)&& {
// rdar://107351099 SimpleDateFormat perf

template<typename Derived>
Derived NumberFormatterSettings<Derived>::forDateFormat(bool forDateFormat) const& {
Derived NumberFormatterSettings<Derived>::_forDateFormat(bool forDateFormat) const& {
Derived copy(*this);
copy.fMacros.forDateFormat = forDateFormat;
return copy;
}

template<typename Derived>
Derived NumberFormatterSettings<Derived>::forDateFormat(bool forDateFormat)&& {
Derived NumberFormatterSettings<Derived>::_forDateFormat(bool forDateFormat)&& {
Derived move(std::move(*this));
move.fMacros.forDateFormat = forDateFormat;
return move;
Expand Down Expand Up @@ -408,12 +408,12 @@ Derived NumberFormatterSettings<Derived>::macros(impl::MacroProps&& macros)&& {
// Note: toSkeleton defined in number_skeletons.cpp

template<typename Derived>
LocalPointer<Derived> NumberFormatterSettings<Derived>::clone() const & {
LocalPointer<Derived> NumberFormatterSettings<Derived>::_clone() const & {
return LocalPointer<Derived>(new Derived(*this));
}

template<typename Derived>
LocalPointer<Derived> NumberFormatterSettings<Derived>::clone() && {
LocalPointer<Derived> NumberFormatterSettings<Derived>::_clone() && {
return LocalPointer<Derived>(new Derived(std::move(*this)));
}

Expand Down
8 changes: 4 additions & 4 deletions icuSources/i18n/smpdtfmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1738,13 +1738,13 @@ createFastFormatter(const DecimalFormat* df, int32_t minInt, int32_t maxInt, UEr
}
#if APPLE_ICU_CHANGES
// rdar://107351099 SimpleDateFormat perf+
return lnfBase->integerWidth(
return lnfBase->_integerWidth(
number::IntegerWidth::zeroFillTo(minInt).truncateAt(maxInt)
).forDateFormat(true).clone().orphan();
)._forDateFormat(true)._clone().orphan();
#else
return lnfBase->integerWidth(
return lnfBase->_integerWidth(
number::IntegerWidth::zeroFillTo(minInt).truncateAt(maxInt)
).clone().orphan();
)._clone().orphan();
#endif // APPLE_ICU_CHANGES
}

Expand Down
12 changes: 6 additions & 6 deletions icuSources/include/_foundation_unicode/numberformatter.h
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@ class U_I18N_API NumberFormatterSettings {
* @see IntegerWidth
* @stable ICU 60
*/
Derived integerWidth(const IntegerWidth &style) const &;
Derived _integerWidth(const IntegerWidth &style) const &;

/**
* Overload of integerWidth() for use on an rvalue reference.
Expand All @@ -2003,7 +2003,7 @@ class U_I18N_API NumberFormatterSettings {
* @see #integerWidth
* @stable ICU 62
*/
Derived integerWidth(const IntegerWidth &style) &&;
Derived _integerWidth(const IntegerWidth &style) &&;

/**
* Specifies the symbols (decimal separator, grouping separator, percent sign, numerals, etc.) to use when rendering
Expand Down Expand Up @@ -2386,10 +2386,10 @@ class U_I18N_API NumberFormatterSettings {
*
* @internal: This API is ICU internal only.
*/
Derived forDateFormat(bool forDateFormat) const &;
Derived _forDateFormat(bool forDateFormat) const &;

/** @internal */
Derived forDateFormat(bool forDateFormat) &&;
Derived _forDateFormat(bool forDateFormat) &&;

#endif // APPLE_ICU_CHANGES

Expand Down Expand Up @@ -2441,7 +2441,7 @@ class U_I18N_API NumberFormatterSettings {
* nullptr on failure.
* @stable ICU 64
*/
LocalPointer<Derived> clone() const &;
LocalPointer<Derived> _clone() const &;

/**
* Overload of clone for use on an rvalue reference.
Expand All @@ -2450,7 +2450,7 @@ class U_I18N_API NumberFormatterSettings {
* nullptr on failure.
* @stable ICU 64
*/
LocalPointer<Derived> clone() &&;
LocalPointer<Derived> _clone() &&;

/**
* Sets the UErrorCode if an error occurred in the fluent chain.
Expand Down