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)); |