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

Unified Diff: source/extra/uconv/uconv.cpp

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 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/Makefile.in ('k') | source/extra/uconv/uwmsg.c » ('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 566826587057abb9f1afa157766f186bba9f8c58..1fd2565831d77796038290805b99d1d474442318 100644
--- a/source/extra/uconv/uconv.cpp
+++ b/source/extra/uconv/uconv.cpp
@@ -1,6 +1,6 @@
/*****************************************************************************
*
-* Copyright (C) 1999-2013, International Business Machines
+* Copyright (C) 1999-2014, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************/
@@ -66,8 +66,6 @@ U_NAMESPACE_USE
U_CFUNC char uconvmsg_dat[];
#endif
-#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
-
#define DEFAULT_BUFSZ 4096
#define UCONVMSG "uconvmsg"
@@ -659,9 +657,9 @@ ConvertFile::convertFile(const char *pname,
parse.line = -1;
if (uprv_strchr(translit, ':') || uprv_strchr(translit, '>') || uprv_strchr(translit, '<') || uprv_strchr(translit, '>')) {
- t = Transliterator::createFromRules("Uconv", str, UTRANS_FORWARD, parse, err);
+ t = Transliterator::createFromRules(UNICODE_STRING_SIMPLE("Uconv"), str, UTRANS_FORWARD, parse, err);
} else {
- t = Transliterator::createInstance(translit, UTRANS_FORWARD, err);
+ t = Transliterator::createInstance(UnicodeString(translit, -1, US_INV), UTRANS_FORWARD, err);
}
if (U_FAILURE(err)) {
@@ -946,7 +944,7 @@ ConvertFile::convertFile(const char *pname,
int8_t i, length, errorLength;
UErrorCode localError = U_ZERO_ERROR;
- errorLength = (int8_t)LENGTHOF(errorUChars);
+ errorLength = (int8_t)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[]
« no previous file with comments | « source/extra/uconv/Makefile.in ('k') | source/extra/uconv/uwmsg.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698