mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 00:43:32 +00:00
ICU-11276 Replying to Mark review feedback.
This commit is contained in:
parent
d4e8ed7ed0
commit
4f2604655a
3 changed files with 4 additions and 8 deletions
icu4c/source/i18n
icu4j/main/classes/core/src/com/ibm/icu/number
|
@ -18,12 +18,6 @@
|
|||
U_NAMESPACE_BEGIN namespace number {
|
||||
namespace impl {
|
||||
|
||||
class ReferencingPluralsModifierStore : public ModifierStore {
|
||||
public:
|
||||
virtual const Modifier* getModifier(int8_t signum, StandardPlural::Form plural) const;
|
||||
const Modifier* mods[StandardPlural::COUNT] = {};
|
||||
};
|
||||
|
||||
/**
|
||||
* The canonical implementation of {@link Modifier}, containing a prefix and suffix string.
|
||||
* TODO: This is not currently being used by real code and could be removed.
|
||||
|
@ -296,6 +290,7 @@ class U_I18N_API AdoptingModifierStore : public ModifierStore, public UMemory {
|
|||
* Sets the Modifier with the specified signum and plural form.
|
||||
*/
|
||||
void adoptModifier(int8_t signum, StandardPlural::Form plural, const Modifier *mod) {
|
||||
U_ASSERT(mods[getModIndex(signum, plural)] == nullptr);
|
||||
mods[getModIndex(signum, plural)] = mod;
|
||||
}
|
||||
|
||||
|
@ -304,6 +299,7 @@ class U_I18N_API AdoptingModifierStore : public ModifierStore, public UMemory {
|
|||
* The modifier will apply to all plural forms.
|
||||
*/
|
||||
void adoptModifierWithoutPlural(int8_t signum, const Modifier *mod) {
|
||||
U_ASSERT(mods[getModIndex(signum, DEFAULT_STANDARD_PLURAL)] == nullptr);
|
||||
mods[getModIndex(signum, DEFAULT_STANDARD_PLURAL)] = mod;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ void getNumberRangeData(const char* localeName, const char* nsName, NumberRangeD
|
|||
|
||||
if (data.rangePattern.getArgumentLimit() == 0) {
|
||||
// No data!
|
||||
data.rangePattern = {u"{0} --- {1}", status};
|
||||
data.rangePattern = {u"{0}–{1}", status};
|
||||
}
|
||||
if (data.approximatelyPattern.getArgumentLimit() == 0) {
|
||||
// No data!
|
||||
|
|
|
@ -93,7 +93,7 @@ class NumberRangeFormatterImpl {
|
|||
// TODO: Is it necessary to manually fall back to latn, or does the data sink take care of that?
|
||||
|
||||
if (sink.rangePattern == null) {
|
||||
sink.rangePattern = SimpleFormatterImpl.compileToStringMinMaxArguments("{0} --- {1}", sb, 2, 2);
|
||||
sink.rangePattern = SimpleFormatterImpl.compileToStringMinMaxArguments("{0}–{1}", sb, 2, 2);
|
||||
}
|
||||
if (sink.approximatelyPattern == null) {
|
||||
sink.approximatelyPattern = SimpleFormatterImpl.compileToStringMinMaxArguments("~{0}", sb, 1, 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue