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

Unified Diff: source/i18n/compactdecimalformat.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/i18n/collationweights.cpp ('k') | source/i18n/csdetect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/compactdecimalformat.cpp
diff --git a/source/i18n/compactdecimalformat.cpp b/source/i18n/compactdecimalformat.cpp
index 0e3c45f0b7e26f00bae4156f6e2536889d5ca90e..74d9c04191c5360ecaad5066797a5117b8ab0e91 100644
--- a/source/i18n/compactdecimalformat.cpp
+++ b/source/i18n/compactdecimalformat.cpp
@@ -1,6 +1,6 @@
/*
*******************************************************************************
-* Copyright (C) 1997-2012, International Business Machines Corporation and *
+* Copyright (C) 1997-2014, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*
@@ -26,8 +26,6 @@
#include "unicode/ures.h"
#include "uresimp.h"
-#define LENGTHOF(array) (int32_t)(sizeof(array) / sizeof((array)[0]))
-
// Maps locale name to CDFLocaleData struct.
static UHashtable* gCompactDecimalData = NULL;
static UMutex gCompactDecimalMetaLock = U_MUTEX_INITIALIZER;
@@ -768,13 +766,13 @@ static int32_t populatePrefixSuffix(
if (U_FAILURE(status)) {
return 0;
}
- int32_t firstIdx = formatStr.indexOf(kZero, LENGTHOF(kZero), 0);
+ int32_t firstIdx = formatStr.indexOf(kZero, UPRV_LENGTHOF(kZero), 0);
// We must have 0's in format string.
if (firstIdx == -1) {
status = U_INTERNAL_PROGRAM_ERROR;
return 0;
}
- int32_t lastIdx = formatStr.lastIndexOf(kZero, LENGTHOF(kZero), firstIdx);
+ int32_t lastIdx = formatStr.lastIndexOf(kZero, UPRV_LENGTHOF(kZero), firstIdx);
CDFUnit* unit = createCDFUnit(variant, log10Value, result, status);
if (U_FAILURE(status)) {
return 0;
« no previous file with comments | « source/i18n/collationweights.cpp ('k') | source/i18n/csdetect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698