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/i18n/tznames.cpp

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 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/tzgnames.cpp ('k') | source/i18n/ucal.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/i18n/tznames.cpp
diff --git a/source/i18n/tznames.cpp b/source/i18n/tznames.cpp
index 57bda37fc666326953df2925b05a8d559e8a68fa..db1ce0ddeec0cc0541fd426e9b1a506808a9e511 100644
--- a/source/i18n/tznames.cpp
+++ b/source/i18n/tznames.cpp
@@ -1,6 +1,6 @@
/*
*******************************************************************************
-* Copyright (C) 2011-2014, International Business Machines Corporation and *
+* Copyright (C) 2011-2015, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@@ -81,7 +81,7 @@ U_CDECL_END
* block.
*/
static void sweepCache() {
- int32_t pos = -1;
+ int32_t pos = UHASH_FIRST;
const UHashElement* elem;
double now = (double)uprv_getUTCtime();
@@ -301,7 +301,6 @@ TimeZoneNames::createInstance(const Locale& locale, UErrorCode& status) {
return instance;
}
-#ifndef U_HIDE_DRAFT_API
TimeZoneNames*
TimeZoneNames::createTZDBInstance(const Locale& locale, UErrorCode& status) {
TimeZoneNames *instance = NULL;
@@ -313,7 +312,6 @@ TimeZoneNames::createTZDBInstance(const Locale& locale, UErrorCode& status) {
}
return instance;
}
-#endif /* U_HIDE_DRAFT_API */
UnicodeString&
TimeZoneNames::getExemplarLocationName(const UnicodeString& tzID, UnicodeString& name) const {
@@ -324,7 +322,8 @@ UnicodeString&
TimeZoneNames::getDisplayName(const UnicodeString& tzID, UTimeZoneNameType type, UDate date, UnicodeString& name) const {
getTimeZoneDisplayName(tzID, type, name);
if (name.isEmpty()) {
- UnicodeString mzID;
+ UChar mzIDBuf[32];
+ UnicodeString mzID(mzIDBuf, 0, UPRV_LENGTHOF(mzIDBuf));
getMetaZoneID(tzID, date, mzID);
getMetaZoneDisplayName(mzID, type, name);
}
« no previous file with comments | « source/i18n/tzgnames.cpp ('k') | source/i18n/ucal.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698