Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: source/i18n/decimfmtimpl.cpp

Issue 2440913002: Update ICU to 58.1
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/i18n/decimfmtimpl.h ('k') | source/i18n/digitaffix.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/decimfmtimpl.cpp
diff --git a/source/i18n/decimfmtimpl.cpp b/source/i18n/decimfmtimpl.cpp
index 8493ecd03772f54748094433f81d084b6e94a519..1bf742d148c60529e3e26feb7af6a12abca7af75 100644
--- a/source/i18n/decimfmtimpl.cpp
+++ b/source/i18n/decimfmtimpl.cpp
@@ -1,3 +1,5 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
* Copyright (C) 2015, International Business Machines
* Corporation and others. All Rights Reserved.
@@ -241,9 +243,9 @@ DecimalFormatImpl::setMultiplierScale(int32_t scale) {
if (scale == 0) {
// Needed to preserve equality. fMultiplier == 0 means
// multiplier is 1.
- fMultiplier.set(0);
+ fMultiplier.set((int32_t)0);
} else {
- fMultiplier.set(1);
+ fMultiplier.set((int32_t)1);
fMultiplier.shiftDecimalRight(scale);
}
}
@@ -425,7 +427,7 @@ DecimalFormatImpl::format(
UnicodeString &
DecimalFormatImpl::format(
- const StringPiece &number,
+ StringPiece number,
UnicodeString &appendTo,
FieldPositionIterator *posIter,
UErrorCode &status) const {
@@ -706,7 +708,7 @@ DecimalFormatImpl::getMultiplier() const {
void
DecimalFormatImpl::setMultiplier(int32_t m) {
if (m == 0 || m == 1) {
- fMultiplier.set(0);
+ fMultiplier.set((int32_t)0);
} else {
fMultiplier.set(m);
}
@@ -1481,7 +1483,7 @@ DecimalFormatImpl::toNumberPattern(
}
} else {
if (i < roundingIncrementUpperExp && i >= roundingIncrementLowerExp) {
- result.append(fEffPrecision.fMantissa.fRoundingIncrement.getDigitByExponent(i) + kPatternZeroDigit);
+ result.append((UChar)(fEffPrecision.fMantissa.fRoundingIncrement.getDigitByExponent(i) + kPatternZeroDigit));
} else if (minInterval.contains(i)) {
result.append(kPatternZeroDigit);
} else {
« no previous file with comments | « source/i18n/decimfmtimpl.h ('k') | source/i18n/digitaffix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698