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

Unified Diff: source/i18n/fmtable.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/ethpccal.cpp ('k') | source/i18n/fmtable_cnv.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/fmtable.cpp
diff --git a/source/i18n/fmtable.cpp b/source/i18n/fmtable.cpp
index a2fa4095f261447332fca1ed4aeb26751c9f08c7..4c736b4d5f386807ab7cbe10bf8b12211f378150 100644
--- a/source/i18n/fmtable.cpp
+++ b/source/i18n/fmtable.cpp
@@ -1,7 +1,9 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
-* Copyright (C) 1997-2014, International Business Machines Corporation and *
-* others. All Rights Reserved. *
+* Copyright (C) 1997-2016, International Business Machines Corporation and
+* others. All Rights Reserved.
*******************************************************************************
*
* File FMTABLE.CPP
@@ -155,7 +157,7 @@ Formattable::Formattable(int64_t value)
// -------------------------------------
// Creates a formattable object with a decimal number value from a string.
-Formattable::Formattable(const StringPiece &number, UErrorCode &status) {
+Formattable::Formattable(StringPiece number, UErrorCode &status) {
init();
setDecimalNumber(number, status);
}
@@ -431,7 +433,8 @@ Formattable::getLong(UErrorCode& status) const
return ((const Measure*) fValue.fObject)->
getNumber().getLong(status);
}
- default:
+ U_FALLTHROUGH;
+ default:
status = U_INVALID_FORMAT_ERROR;
return 0;
}
@@ -482,7 +485,8 @@ Formattable::getInt64(UErrorCode& status) const
return ((const Measure*) fValue.fObject)->
getNumber().getInt64(status);
}
- default:
+ U_FALLTHROUGH;
+ default:
status = U_INVALID_FORMAT_ERROR;
return 0;
}
@@ -512,7 +516,8 @@ Formattable::getDouble(UErrorCode& status) const
return ((const Measure*) fValue.fObject)->
getNumber().getDouble(status);
}
- default:
+ U_FALLTHROUGH;
+ default:
status = U_INVALID_FORMAT_ERROR;
return 0;
}
@@ -793,7 +798,7 @@ Formattable::adoptDigitList(DigitList *dl) {
// ---------------------------------------
void
-Formattable::setDecimalNumber(const StringPiece &numberString, UErrorCode &status) {
+Formattable::setDecimalNumber(StringPiece numberString, UErrorCode &status) {
if (U_FAILURE(status)) {
return;
}
« no previous file with comments | « source/i18n/ethpccal.cpp ('k') | source/i18n/fmtable_cnv.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698