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

Unified Diff: source/i18n/csrsbcs.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/csrsbcs.h ('k') | source/i18n/csrucode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/csrsbcs.cpp
diff --git a/source/i18n/csrsbcs.cpp b/source/i18n/csrsbcs.cpp
index d346af20bb77a29fa2eba4b8939237fa29651e6b..10bd9c9d54676ca32b1b02f9be80a405b79db5bd 100644
--- a/source/i18n/csrsbcs.cpp
+++ b/source/i18n/csrsbcs.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) 2005-2015, International Business Machines
+ * Copyright (C) 2005-2016, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/
@@ -15,7 +17,6 @@
#define N_GRAM_SIZE 3
#define N_GRAM_MASK 0xFFFFFF
-#define ARRAY_SIZE(array) (sizeof array / sizeof array[0])
U_NAMESPACE_BEGIN
@@ -892,7 +893,7 @@ UBool CharsetRecog_8859_1::match(InputText *textIn, CharsetMatch *results) const
const char *name = textIn->fC1Bytes? "windows-1252" : "ISO-8859-1";
uint32_t i;
int32_t bestConfidenceSoFar = -1;
- for (i=0; i < ARRAY_SIZE(ngrams_8859_1) ; i++) {
+ for (i=0; i < UPRV_LENGTHOF(ngrams_8859_1) ; i++) {
const int32_t *ngrams = ngrams_8859_1[i].ngrams;
const char *lang = ngrams_8859_1[i].lang;
int32_t confidence = match_sbcs(textIn, ngrams, charMap_8859_1);
@@ -919,7 +920,7 @@ UBool CharsetRecog_8859_2::match(InputText *textIn, CharsetMatch *results) const
const char *name = textIn->fC1Bytes? "windows-1250" : "ISO-8859-2";
uint32_t i;
int32_t bestConfidenceSoFar = -1;
- for (i=0; i < ARRAY_SIZE(ngrams_8859_2) ; i++) {
+ for (i=0; i < UPRV_LENGTHOF(ngrams_8859_2) ; i++) {
const int32_t *ngrams = ngrams_8859_2[i].ngrams;
const char *lang = ngrams_8859_2[i].lang;
int32_t confidence = match_sbcs(textIn, ngrams, charMap_8859_2);
« no previous file with comments | « source/i18n/csrsbcs.h ('k') | source/i18n/csrucode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698