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

Unified Diff: source/extra/uconv/uconv.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/extra/uconv/resources/root.txt ('k') | source/extra/uconv/uconv.vcxproj » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/extra/uconv/uconv.cpp
diff --git a/source/extra/uconv/uconv.cpp b/source/extra/uconv/uconv.cpp
index 1fd2565831d77796038290805b99d1d474442318..2a043f874f55194f53cda08ee72fe4624ec523db 100644
--- a/source/extra/uconv/uconv.cpp
+++ b/source/extra/uconv/uconv.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) 1999-2014, International Business Machines
+* Copyright (C) 1999-2016, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************/
@@ -173,7 +175,7 @@ static struct callback_ent {
static const struct callback_ent *findCallback(const char *name) {
int i, count =
- sizeof(transcode_callbacks) / sizeof(*transcode_callbacks);
+ UPRV_LENGTHOF(transcode_callbacks);
/* We'll do a linear search, there aren't many of them and bsearch()
may not be that portable. */
@@ -944,7 +946,7 @@ ConvertFile::convertFile(const char *pname,
int8_t i, length, errorLength;
UErrorCode localError = U_ZERO_ERROR;
- errorLength = (int8_t)UPRV_LENGTHOF(errorUChars);
+ errorLength = UPRV_LENGTHOF(errorUChars);
ucnv_getInvalidUChars(convto, errorUChars, &errorLength, &localError);
if (U_FAILURE(localError) || errorLength == 0) {
// need at least 1 so that we don't access beyond the length of fromoffsets[]
@@ -1082,7 +1084,7 @@ static void usage(const char *pname, int ecode) {
/* Now dump callbacks and finish. */
int i, count =
- sizeof(transcode_callbacks) / sizeof(*transcode_callbacks);
+ UPRV_LENGTHOF(transcode_callbacks);
for (i = 0; i < count; ++i) {
fprintf(fp, " %s", transcode_callbacks[i].name);
}
« no previous file with comments | « source/extra/uconv/resources/root.txt ('k') | source/extra/uconv/uconv.vcxproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698