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

Unified Diff: source/i18n/plurrule.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/plurfmt.cpp ('k') | source/i18n/plurrule_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/plurrule.cpp
diff --git a/source/i18n/plurrule.cpp b/source/i18n/plurrule.cpp
index 0f1ff8d6c4c177e1011e7e46708236d0e3257eb3..cb5ee08d3dc74612736aca8bb1c3753fe73f5712 100644
--- a/source/i18n/plurrule.cpp
+++ b/source/i18n/plurrule.cpp
@@ -1,6 +1,8 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
-* Copyright (C) 2007-2015, International Business Machines Corporation and
+* Copyright (C) 2007-2016, International Business Machines Corporation and
* others. All Rights Reserved.
*******************************************************************************
*
@@ -39,8 +41,6 @@
U_NAMESPACE_BEGIN
-#define ARRAY_SIZE(array) (int32_t)(sizeof array / sizeof array[0])
-
static const UChar PLURAL_KEYWORD_OTHER[]={LOW_O,LOW_T,LOW_H,LOW_E,LOW_R,0};
static const UChar PLURAL_DEFAULT_RULE[]={LOW_O,LOW_T,LOW_H,LOW_E,LOW_R,COLON,SPACE,LOW_N,0};
static const UChar PK_IN[]={LOW_I,LOW_N,0};
@@ -494,6 +494,7 @@ PluralRuleParser::parse(const UnicodeString& ruleData, PluralRules *prules, UErr
case tNotEqual:
curAndConstraint->negated=TRUE;
+ U_FALLTHROUGH;
case tIn:
case tWithin:
case tEqual:
@@ -1059,7 +1060,7 @@ PluralRuleParser::getNumberValue(const UnicodeString& token) {
int32_t i;
char digits[128];
- i = token.extract(0, token.length(), digits, ARRAY_SIZE(digits), US_INV);
+ i = token.extract(0, token.length(), digits, UPRV_LENGTHOF(digits), US_INV);
digits[i]='\0';
return((int32_t)atoi(digits));
« no previous file with comments | « source/i18n/plurfmt.cpp ('k') | source/i18n/plurrule_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698