]>
Commit | Line | Data |
---|---|---|
f82943e0 JP |
1 | diff --git a/icu4c/source/i18n/vtzone.cpp b/icu4c/source/i18n/vtzone.cpp |
2 | index 3035106701..5e738e11fa 100644 | |
3 | --- a/icu4c/source/i18n/vtzone.cpp | |
4 | +++ b/icu4c/source/i18n/vtzone.cpp | |
5 | @@ -1735,14 +1735,14 @@ VTimeZone::write(VTZWriter& writer, UErrorCode& status) const { | |
6 | } | |
7 | } | |
8 | } else { | |
9 | - UnicodeString icutzprop; | |
10 | - UVector customProps(nullptr, uhash_compareUnicodeString, status); | |
11 | + UVector customProps(uprv_deleteUObject, uhash_compareUnicodeString, status); | |
12 | if (olsonzid.length() > 0 && icutzver.length() > 0) { | |
13 | - icutzprop.append(olsonzid); | |
14 | - icutzprop.append(u'['); | |
15 | - icutzprop.append(icutzver); | |
16 | - icutzprop.append(u']'); | |
17 | - customProps.addElement(&icutzprop, status); | |
18 | + LocalPointer<UnicodeString> icutzprop(new UnicodeString(ICU_TZINFO_PROP), status); | |
19 | + icutzprop->append(olsonzid); | |
20 | + icutzprop->append(u'['); | |
21 | + icutzprop->append(icutzver); | |
22 | + icutzprop->append(u']'); | |
23 | + customProps.adoptElement(icutzprop.orphan(), status); | |
24 | } | |
25 | writeZone(writer, *tz, &customProps, status); | |
26 | } |