summaryrefslogtreecommitdiff
path: root/Build/source/libs/icu/icu-src/source/i18n/timezone.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/icu/icu-src/source/i18n/timezone.cpp')
-rw-r--r--Build/source/libs/icu/icu-src/source/i18n/timezone.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/Build/source/libs/icu/icu-src/source/i18n/timezone.cpp b/Build/source/libs/icu/icu-src/source/i18n/timezone.cpp
index 113f61c61ea..234f52cc3dd 100644
--- a/Build/source/libs/icu/icu-src/source/i18n/timezone.cpp
+++ b/Build/source/libs/icu/icu-src/source/i18n/timezone.cpp
@@ -739,8 +739,7 @@ private:
len = mapLen;
}
- UBool getID(int32_t i) {
- UErrorCode ec = U_ZERO_ERROR;
+ UBool getID(int32_t i, UErrorCode& ec) {
int32_t idLen = 0;
const UChar* id = NULL;
UResourceBundle *top = ures_openDirect(0, kZONEINFO, &ec);
@@ -930,7 +929,7 @@ public:
virtual const UnicodeString* snext(UErrorCode& status) {
if (U_SUCCESS(status) && map != NULL && pos < len) {
- getID(map[pos]);
+ getID(map[pos], status);
++pos;
return &unistr;
}
@@ -1032,8 +1031,8 @@ TimeZone::getEquivalentID(const UnicodeString& id, int32_t index) {
UResourceBundle *ares = ures_getByKey(top, kNAMES, NULL, &ec); // dereference Zones section
if (U_SUCCESS(ec)) {
int32_t idLen = 0;
- const UChar* id = ures_getStringByIndex(ares, zone, &idLen, &ec);
- result.fastCopyFrom(UnicodeString(TRUE, id, idLen));
+ const UChar* id2 = ures_getStringByIndex(ares, zone, &idLen, &ec);
+ result.fastCopyFrom(UnicodeString(TRUE, id2, idLen));
U_DEBUG_TZ_MSG(("gei(%d) -> %d, len%d, %s\n", index, zone, result.length(), u_errorName(ec)));
}
ures_close(ares);
@@ -1200,7 +1199,7 @@ TimeZone::getDisplayName(UBool daylight, EDisplayType style, const Locale& local
{
UErrorCode status = U_ZERO_ERROR;
UDate date = Calendar::getNow();
- UTimeZoneFormatTimeType timeType;
+ UTimeZoneFormatTimeType timeType = UTZFMT_TIME_TYPE_UNKNOWN;
int32_t offset;
if (style == GENERIC_LOCATION || style == LONG_GENERIC || style == SHORT_GENERIC) {
@@ -1613,7 +1612,7 @@ TimeZone::getWindowsID(const UnicodeString& id, UnicodeString& winid, UErrorCode
end = tzids + len;
hasNext = FALSE;
}
- if (canonicalID.compare(start, end - start) == 0) {
+ if (canonicalID.compare(start, static_cast<int32_t>(end - start)) == 0) {
winid = UnicodeString(ures_getKey(winzone), -1 , US_INV);
found = TRUE;
break;
@@ -1674,7 +1673,7 @@ TimeZone::getIDForWindowsID(const UnicodeString& winid, const char* region, Unic
if (end == NULL) {
id.setTo(tzids, -1);
} else {
- id.setTo(tzids, end - tzids);
+ id.setTo(tzids, static_cast<int32_t>(end - tzids));
}
gotID = TRUE;
}