mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 14:31:31 +00:00
ICU-13117 Changing override to U_OVERRIDE in number formatting code.
X-SVN-Rev: 40541
This commit is contained in:
parent
ca350d8a82
commit
9d5639ac16
9 changed files with 58 additions and 57 deletions
|
@ -24,7 +24,7 @@ class CompactData : public MultiplierProducer {
|
|||
void populate(const Locale &locale, const char *nsName, CompactStyle compactStyle,
|
||||
CompactType compactType, UErrorCode &status);
|
||||
|
||||
int32_t getMultiplier(int32_t magnitude) const override;
|
||||
int32_t getMultiplier(int32_t magnitude) const U_OVERRIDE;
|
||||
|
||||
const UChar *getPattern(int32_t magnitude, StandardPlural::Form plural) const;
|
||||
|
||||
|
@ -40,7 +40,7 @@ class CompactData : public MultiplierProducer {
|
|||
public:
|
||||
explicit CompactDataSink(CompactData &data) : data(data) {}
|
||||
|
||||
void put(const char *key, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) override;
|
||||
void put(const char *key, ResourceValue &value, UBool /*noFallback*/, UErrorCode &status) U_OVERRIDE;
|
||||
|
||||
private:
|
||||
CompactData &data;
|
||||
|
@ -60,10 +60,10 @@ class CompactHandler : public MicroPropsGenerator, public UMemory {
|
|||
MutablePatternModifier *buildReference, const MicroPropsGenerator *parent,
|
||||
UErrorCode &status);
|
||||
|
||||
~CompactHandler() override;
|
||||
~CompactHandler() U_OVERRIDE;
|
||||
|
||||
void
|
||||
processQuantity(DecimalQuantity &quantity, MicroProps µs, UErrorCode &status) const override;
|
||||
processQuantity(DecimalQuantity &quantity, MicroProps µs, UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
private:
|
||||
const PluralRules *rules;
|
||||
|
|
|
@ -114,10 +114,10 @@ class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory {
|
|||
bool isNegative() const;
|
||||
|
||||
/** @return Whether the value represented by this {@link DecimalQuantity} is infinite. */
|
||||
bool isInfinite() const override;
|
||||
bool isInfinite() const U_OVERRIDE;
|
||||
|
||||
/** @return Whether the value represented by this {@link DecimalQuantity} is not a number. */
|
||||
bool isNaN() const override;
|
||||
bool isNaN() const U_OVERRIDE;
|
||||
|
||||
int64_t toLong() const;
|
||||
|
||||
|
@ -164,7 +164,7 @@ class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory {
|
|||
*/
|
||||
StandardPlural::Form getStandardPlural(const PluralRules *rules) const;
|
||||
|
||||
double getPluralOperand(PluralOperand operand) const override;
|
||||
double getPluralOperand(PluralOperand operand) const U_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Gets the digit at the specified magnitude. For example, if the represented number is 12.3,
|
||||
|
|
|
@ -23,7 +23,7 @@ class LongNameHandler : public MicroPropsGenerator, public UObject {
|
|||
const PluralRules *rules, const MicroPropsGenerator *parent, UErrorCode &status);
|
||||
|
||||
void
|
||||
processQuantity(DecimalQuantity &quantity, MicroProps µs, UErrorCode &status) const override;
|
||||
processQuantity(DecimalQuantity &quantity, MicroProps µs, UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
private:
|
||||
SimpleModifier fModifiers[StandardPlural::Form::COUNT];
|
||||
|
|
|
@ -27,13 +27,13 @@ class U_I18N_API ConstantAffixModifier : public Modifier, public UObject {
|
|||
: fPrefix(prefix), fSuffix(suffix), fField(field), fStrong(strong) {}
|
||||
|
||||
int32_t apply(NumberStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
|
||||
UErrorCode &status) const override;
|
||||
UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
int32_t getPrefixLength(UErrorCode &status) const override;
|
||||
int32_t getPrefixLength(UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
int32_t getCodePointCount(UErrorCode &status) const override;
|
||||
int32_t getCodePointCount(UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
bool isStrong() const override;
|
||||
bool isStrong() const U_OVERRIDE;
|
||||
|
||||
private:
|
||||
UnicodeString fPrefix;
|
||||
|
@ -54,13 +54,13 @@ class U_I18N_API SimpleModifier : public Modifier, public UMemory {
|
|||
SimpleModifier();
|
||||
|
||||
int32_t apply(NumberStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
|
||||
UErrorCode &status) const override;
|
||||
UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
int32_t getPrefixLength(UErrorCode &status) const override;
|
||||
int32_t getPrefixLength(UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
int32_t getCodePointCount(UErrorCode &status) const override;
|
||||
int32_t getCodePointCount(UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
bool isStrong() const override;
|
||||
bool isStrong() const U_OVERRIDE;
|
||||
|
||||
/**
|
||||
* TODO: This belongs in SimpleFormatterImpl. The only reason I haven't moved it there yet is because
|
||||
|
@ -105,13 +105,13 @@ class U_I18N_API ConstantMultiFieldModifier : public Modifier, public UMemory {
|
|||
bool strong) : fPrefix(prefix), fSuffix(suffix), fStrong(strong) {}
|
||||
|
||||
int32_t apply(NumberStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
|
||||
UErrorCode &status) const override;
|
||||
UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
int32_t getPrefixLength(UErrorCode &status) const override;
|
||||
int32_t getPrefixLength(UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
int32_t getCodePointCount(UErrorCode &status) const override;
|
||||
int32_t getCodePointCount(UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
bool isStrong() const override;
|
||||
bool isStrong() const U_OVERRIDE;
|
||||
|
||||
protected:
|
||||
// NOTE: In Java, these are stored as array pointers. In C++, the NumberStringBuilder is stored by
|
||||
|
@ -129,7 +129,7 @@ class U_I18N_API CurrencySpacingEnabledModifier : public ConstantMultiFieldModif
|
|||
bool strong, const DecimalFormatSymbols &symbols, UErrorCode &status);
|
||||
|
||||
int32_t apply(NumberStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
|
||||
UErrorCode &status) const override;
|
||||
UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
/** Unsafe code path */
|
||||
static int32_t
|
||||
|
@ -169,7 +169,7 @@ class U_I18N_API EmptyModifier : public Modifier, public UMemory {
|
|||
explicit EmptyModifier(bool isStrong) : fStrong(isStrong) {}
|
||||
|
||||
int32_t apply(NumberStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
|
||||
UErrorCode &status) const override {
|
||||
UErrorCode &status) const U_OVERRIDE {
|
||||
(void)output;
|
||||
(void)leftIndex;
|
||||
(void)rightIndex;
|
||||
|
@ -177,17 +177,17 @@ class U_I18N_API EmptyModifier : public Modifier, public UMemory {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int32_t getPrefixLength(UErrorCode &status) const override {
|
||||
int32_t getPrefixLength(UErrorCode &status) const U_OVERRIDE {
|
||||
(void)status;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t getCodePointCount(UErrorCode &status) const override {
|
||||
int32_t getCodePointCount(UErrorCode &status) const U_OVERRIDE {
|
||||
(void)status;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool isStrong() const override {
|
||||
bool isStrong() const U_OVERRIDE {
|
||||
return fStrong;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,9 +22,9 @@ class MutablePatternModifier;
|
|||
// Exported as U_I18N_API because it is needed for the unit test PatternModifierTest
|
||||
class U_I18N_API ImmutablePatternModifier : public MicroPropsGenerator {
|
||||
public:
|
||||
~ImmutablePatternModifier() override = default;
|
||||
~ImmutablePatternModifier() U_OVERRIDE = default;
|
||||
|
||||
void processQuantity(DecimalQuantity &, MicroProps µs, UErrorCode &status) const override;
|
||||
void processQuantity(DecimalQuantity &, MicroProps µs, UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
void applyToMicros(MicroProps µs, DecimalQuantity &quantity) const;
|
||||
|
||||
|
@ -62,7 +62,7 @@ class U_I18N_API MutablePatternModifier
|
|||
: public MicroPropsGenerator, public Modifier, public SymbolProvider, public CharSequence {
|
||||
public:
|
||||
|
||||
~MutablePatternModifier() override = default;
|
||||
~MutablePatternModifier() U_OVERRIDE = default;
|
||||
|
||||
/**
|
||||
* @param isStrong
|
||||
|
@ -155,29 +155,29 @@ class U_I18N_API MutablePatternModifier
|
|||
|
||||
MicroPropsGenerator &addToChain(const MicroPropsGenerator *parent);
|
||||
|
||||
void processQuantity(DecimalQuantity &, MicroProps µs, UErrorCode &status) const override;
|
||||
void processQuantity(DecimalQuantity &, MicroProps µs, UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
int32_t apply(NumberStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
|
||||
UErrorCode &status) const override;
|
||||
UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
int32_t getPrefixLength(UErrorCode &status) const override;
|
||||
int32_t getPrefixLength(UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
int32_t getCodePointCount(UErrorCode &status) const override;
|
||||
int32_t getCodePointCount(UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
bool isStrong() const override;
|
||||
bool isStrong() const U_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Returns the string that substitutes a given symbol type in a pattern.
|
||||
*/
|
||||
UnicodeString getSymbol(AffixPatternType type) const override;
|
||||
UnicodeString getSymbol(AffixPatternType type) const U_OVERRIDE;
|
||||
|
||||
int32_t length() const override;
|
||||
int32_t length() const U_OVERRIDE;
|
||||
|
||||
char16_t charAt(int32_t index) const override;
|
||||
char16_t charAt(int32_t index) const U_OVERRIDE;
|
||||
|
||||
// Use default implementation of codePointAt
|
||||
|
||||
UnicodeString toUnicodeString() const override;
|
||||
UnicodeString toUnicodeString() const U_OVERRIDE;
|
||||
|
||||
private:
|
||||
// Modifier details
|
||||
|
|
|
@ -61,25 +61,25 @@ struct U_I18N_API ParsedPatternInfo : public AffixPatternProvider, public UMemor
|
|||
|
||||
ParsedPatternInfo() : state(this->pattern), currentSubpattern(nullptr) {}
|
||||
|
||||
~ParsedPatternInfo() override = default;
|
||||
~ParsedPatternInfo() U_OVERRIDE = default;
|
||||
|
||||
static int32_t getLengthFromEndpoints(const Endpoints &endpoints);
|
||||
|
||||
char16_t charAt(int32_t flags, int32_t index) const override;
|
||||
char16_t charAt(int32_t flags, int32_t index) const U_OVERRIDE;
|
||||
|
||||
int32_t length(int32_t flags) const override;
|
||||
int32_t length(int32_t flags) const U_OVERRIDE;
|
||||
|
||||
UnicodeString getString(int32_t flags) const;
|
||||
|
||||
bool positiveHasPlusSign() const override;
|
||||
bool positiveHasPlusSign() const U_OVERRIDE;
|
||||
|
||||
bool hasNegativeSubpattern() const override;
|
||||
bool hasNegativeSubpattern() const U_OVERRIDE;
|
||||
|
||||
bool negativeHasMinusSign() const override;
|
||||
bool negativeHasMinusSign() const U_OVERRIDE;
|
||||
|
||||
bool hasCurrencySign() const override;
|
||||
bool hasCurrencySign() const U_OVERRIDE;
|
||||
|
||||
bool containsSymbolType(AffixPatternType type, UErrorCode &status) const override;
|
||||
bool containsSymbolType(AffixPatternType type, UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
private:
|
||||
struct ParserState {
|
||||
|
|
|
@ -20,13 +20,13 @@ class U_I18N_API ScientificModifier : public UMemory, public Modifier {
|
|||
void set(int32_t exponent, const ScientificHandler *handler);
|
||||
|
||||
int32_t apply(NumberStringBuilder &output, int32_t leftIndex, int32_t rightIndex,
|
||||
UErrorCode &status) const override;
|
||||
UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
int32_t getPrefixLength(UErrorCode &status) const override;
|
||||
int32_t getPrefixLength(UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
int32_t getCodePointCount(UErrorCode &status) const override;
|
||||
int32_t getCodePointCount(UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
bool isStrong() const override;
|
||||
bool isStrong() const U_OVERRIDE;
|
||||
|
||||
private:
|
||||
int32_t fExponent;
|
||||
|
@ -39,9 +39,9 @@ class ScientificHandler : public UMemory, public MicroPropsGenerator, public Mul
|
|||
const MicroPropsGenerator *parent);
|
||||
|
||||
void
|
||||
processQuantity(DecimalQuantity &quantity, MicroProps µs, UErrorCode &status) const override;
|
||||
processQuantity(DecimalQuantity &quantity, MicroProps µs, UErrorCode &status) const U_OVERRIDE;
|
||||
|
||||
int32_t getMultiplier(int32_t magnitude) const override;
|
||||
int32_t getMultiplier(int32_t magnitude) const U_OVERRIDE;
|
||||
|
||||
private:
|
||||
const Notation::ScientificSettings& fSettings;
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#include "unicode/numberformatter.h"
|
||||
#include "unicode/utf16.h"
|
||||
#include "uassert.h"
|
||||
#include "unicode/platform.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
namespace number {
|
||||
|
|
|
@ -21,21 +21,21 @@ class UnicodeStringCharSequence : public CharSequence {
|
|||
fStr = other;
|
||||
}
|
||||
|
||||
~UnicodeStringCharSequence() override = default;
|
||||
~UnicodeStringCharSequence() U_OVERRIDE = default;
|
||||
|
||||
int32_t length() const override {
|
||||
int32_t length() const U_OVERRIDE {
|
||||
return fStr.length();
|
||||
}
|
||||
|
||||
char16_t charAt(int32_t index) const override {
|
||||
char16_t charAt(int32_t index) const U_OVERRIDE {
|
||||
return fStr.charAt(index);
|
||||
}
|
||||
|
||||
UChar32 codePointAt(int32_t index) const override {
|
||||
UChar32 codePointAt(int32_t index) const U_OVERRIDE {
|
||||
return fStr.char32At(index);
|
||||
}
|
||||
|
||||
UnicodeString toUnicodeString() const override {
|
||||
UnicodeString toUnicodeString() const U_OVERRIDE {
|
||||
// Allocate a UnicodeString of the correct length
|
||||
UnicodeString output(length(), 0, -1);
|
||||
for (int32_t i = 0; i < length(); i++) {
|
||||
|
@ -80,7 +80,7 @@ struct MicroProps : public MicroPropsGenerator {
|
|||
|
||||
MicroProps &operator=(const MicroProps &other) = default;
|
||||
|
||||
void processQuantity(DecimalQuantity &, MicroProps µs, UErrorCode &status) const override {
|
||||
void processQuantity(DecimalQuantity &, MicroProps µs, UErrorCode &status) const U_OVERRIDE {
|
||||
(void)status;
|
||||
if (this == µs) {
|
||||
// Unsafe path: no need to perform a copy.
|
||||
|
|
Loading…
Add table
Reference in a new issue