diff options
author | Steven R. Loomis <srloomis@us.ibm.com> | 2017-09-21 15:31:38 -0700 |
---|---|---|
committer | Steven R. Loomis <srloomis@us.ibm.com> | 2017-11-09 18:25:58 -0800 |
commit | 44d3e17985befbd45457d5ad7f0a0387849e1b2f (patch) | |
tree | f75f2eddb868f13254b7f514875534dee616c0d6 /deps/icu-small/source/i18n/number_decimfmtprops.cpp | |
parent | 3b3ceafaf922e1d79950595eaa501aa412913820 (diff) | |
download | android-node-v8-44d3e17985befbd45457d5ad7f0a0387849e1b2f.tar.gz android-node-v8-44d3e17985befbd45457d5ad7f0a0387849e1b2f.tar.bz2 android-node-v8-44d3e17985befbd45457d5ad7f0a0387849e1b2f.zip |
deps: ICU 60 bump
- Update to released ICU 60.1, including:
- CLDR 32 (many new languages and data improvements)
- Unicode 10 (8,518 new characters, including four new scripts,
7,494 new Han characters, and 56 new emoji characters)
- UTF-8 malformed bytes now handled according to W3C/WHATWG spec
Fixes: https://github.com/nodejs/node/issues/15540
PR-URL: https://github.com/nodejs/node/pull/16876
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'deps/icu-small/source/i18n/number_decimfmtprops.cpp')
-rw-r--r-- | deps/icu-small/source/i18n/number_decimfmtprops.cpp | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/deps/icu-small/source/i18n/number_decimfmtprops.cpp b/deps/icu-small/source/i18n/number_decimfmtprops.cpp new file mode 100644 index 0000000000..cc57cfce6a --- /dev/null +++ b/deps/icu-small/source/i18n/number_decimfmtprops.cpp @@ -0,0 +1,102 @@ +// © 2017 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING && !UPRV_INCOMPLETE_CPP11_SUPPORT + +#include "number_decimfmtprops.h" + +using namespace icu; +using namespace icu::number; +using namespace icu::number::impl; + +DecimalFormatProperties::DecimalFormatProperties() { + clear(); +} + +void DecimalFormatProperties::clear() { + compactStyle.nullify(); + currency.nullify(); + currencyPluralInfo.fPtr.adoptInstead(nullptr); + currencyUsage.nullify(); + decimalPatternMatchRequired = false; + decimalSeparatorAlwaysShown = false; + exponentSignAlwaysShown = false; + formatWidth = -1; + groupingSize = -1; + magnitudeMultiplier = 0; + maximumFractionDigits = -1; + maximumIntegerDigits = -1; + maximumSignificantDigits = -1; + minimumExponentDigits = -1; + minimumFractionDigits = -1; + minimumGroupingDigits = -1; + minimumIntegerDigits = -1; + minimumSignificantDigits = -1; + multiplier = 0; + negativePrefix.setToBogus(); + negativePrefixPattern.setToBogus(); + negativeSuffix.setToBogus(); + negativeSuffixPattern.setToBogus(); + padPosition.nullify(); + padString.setToBogus(); + parseCaseSensitive = false; + parseIntegerOnly = false; + parseLenient = false; + parseNoExponent = false; + parseToBigDecimal = false; + positivePrefix.setToBogus(); + positivePrefixPattern.setToBogus(); + positiveSuffix.setToBogus(); + positiveSuffixPattern.setToBogus(); + roundingIncrement = 0.0; + roundingMode.nullify(); + secondaryGroupingSize = -1; + signAlwaysShown = false; +} + +bool DecimalFormatProperties::operator==(const DecimalFormatProperties &other) const { + bool eq = true; + eq = eq && compactStyle == other.compactStyle; + eq = eq && currency == other.currency; + eq = eq && currencyPluralInfo.fPtr.getAlias() == other.currencyPluralInfo.fPtr.getAlias(); + eq = eq && currencyUsage == other.currencyUsage; + eq = eq && decimalPatternMatchRequired == other.decimalPatternMatchRequired; + eq = eq && decimalSeparatorAlwaysShown == other.decimalSeparatorAlwaysShown; + eq = eq && exponentSignAlwaysShown == other.exponentSignAlwaysShown; + eq = eq && formatWidth == other.formatWidth; + eq = eq && groupingSize == other.groupingSize; + eq = eq && magnitudeMultiplier == other.magnitudeMultiplier; + eq = eq && maximumFractionDigits == other.maximumFractionDigits; + eq = eq && maximumIntegerDigits == other.maximumIntegerDigits; + eq = eq && maximumSignificantDigits == other.maximumSignificantDigits; + eq = eq && minimumExponentDigits == other.minimumExponentDigits; + eq = eq && minimumFractionDigits == other.minimumFractionDigits; + eq = eq && minimumGroupingDigits == other.minimumGroupingDigits; + eq = eq && minimumIntegerDigits == other.minimumIntegerDigits; + eq = eq && minimumSignificantDigits == other.minimumSignificantDigits; + eq = eq && multiplier == other.multiplier; + eq = eq && negativePrefix == other.negativePrefix; + eq = eq && negativePrefixPattern == other.negativePrefixPattern; + eq = eq && negativeSuffix == other.negativeSuffix; + eq = eq && negativeSuffixPattern == other.negativeSuffixPattern; + eq = eq && padPosition == other.padPosition; + eq = eq && padString == other.padString; + eq = eq && parseCaseSensitive == other.parseCaseSensitive; + eq = eq && parseIntegerOnly == other.parseIntegerOnly; + eq = eq && parseLenient == other.parseLenient; + eq = eq && parseNoExponent == other.parseNoExponent; + eq = eq && parseToBigDecimal == other.parseToBigDecimal; + eq = eq && positivePrefix == other.positivePrefix; + eq = eq && positivePrefixPattern == other.positivePrefixPattern; + eq = eq && positiveSuffix == other.positiveSuffix; + eq = eq && positiveSuffixPattern == other.positiveSuffixPattern; + eq = eq && roundingIncrement == other.roundingIncrement; + eq = eq && roundingMode == other.roundingMode; + eq = eq && secondaryGroupingSize == other.secondaryGroupingSize; + eq = eq && signAlwaysShown == other.signAlwaysShown; + return eq; +} + +#endif /* #if !UCONFIG_NO_FORMATTING */ |