]> granicus.if.org Git - icu/commitdiff
ICU-9801 Fix some incorrect usage of UnicodeString constructor
authorMichael Ow <mow@svn.icu-project.org>
Sat, 23 Feb 2013 16:58:30 +0000 (16:58 +0000)
committerMichael Ow <mow@svn.icu-project.org>
Sat, 23 Feb 2013 16:58:30 +0000 (16:58 +0000)
X-SVN-Rev: 33312

icu4c/source/i18n/chnsecal.cpp
icu4c/source/i18n/dangical.cpp
icu4c/source/i18n/uspoof.cpp

index 129d18bbd874702725d47c40bfde2e77e15af574..16a3c9a061bd4490136a2d4699705dbfb71fd00b 100644 (file)
@@ -157,7 +157,7 @@ const TimeZone* ChineseCalendar::getChineseCalZoneAstroCalc(void) const {
         umtx_lock(&astroLock);
         {
             if (!gChineseCalendarZoneAstroCalcInitialized) {
-                gChineseCalendarZoneAstroCalc = new SimpleTimeZone(CHINA_OFFSET, UnicodeString("CHINA_ZONE") );
+                gChineseCalendarZoneAstroCalc = new SimpleTimeZone(CHINA_OFFSET, UNICODE_STRING_SIMPLE("CHINA_ZONE") );
                 gChineseCalendarZoneAstroCalcInitialized = TRUE;
                 ucln_i18n_registerCleanup(UCLN_I18N_CHINESE_CALENDAR, calendar_chinese_cleanup);
             }
index 5c86cffa73ef563d7b5b446375a4b0301fffde60..5d517ec2b8a04f44eb5fbcd98bc35969664f7592 100644 (file)
@@ -111,12 +111,12 @@ const TimeZone* DangiCalendar::getDangiCalZoneAstroCalc(void) const {
                 const UDate millis1897[] = { (UDate)((1897 - 1970) * 365 * kOneDay) }; // some days of error is not a problem here
                 const UDate millis1898[] = { (UDate)((1898 - 1970) * 365 * kOneDay) }; // some days of error is not a problem here
                 const UDate millis1912[] = { (UDate)((1912 - 1970) * 365 * kOneDay) }; // this doesn't create an issue for 1911/12/20
-                InitialTimeZoneRule* initialTimeZone = new InitialTimeZoneRule(UnicodeString("GMT+8"), 8*kOneHour, 0);
-                TimeZoneRule* rule1897 = new TimeArrayTimeZoneRule(UnicodeString("Korean 1897"), 7*kOneHour, 0, millis1897, 1, DateTimeRule::STANDARD_TIME);
-                TimeZoneRule* rule1898to1911 = new TimeArrayTimeZoneRule(UnicodeString("Korean 1898-1911"), 8*kOneHour, 0, millis1898, 1, DateTimeRule::STANDARD_TIME);
-                TimeZoneRule* ruleFrom1912 = new TimeArrayTimeZoneRule(UnicodeString("Korean 1912-"), 9*kOneHour, 0, millis1912, 1, DateTimeRule::STANDARD_TIME);
+                InitialTimeZoneRule* initialTimeZone = new InitialTimeZoneRule(UNICODE_STRING_SIMPLE("GMT+8"), 8*kOneHour, 0);
+                TimeZoneRule* rule1897 = new TimeArrayTimeZoneRule(UNICODE_STRING_SIMPLE("Korean 1897"), 7*kOneHour, 0, millis1897, 1, DateTimeRule::STANDARD_TIME);
+                TimeZoneRule* rule1898to1911 = new TimeArrayTimeZoneRule(UNICODE_STRING_SIMPLE("Korean 1898-1911"), 8*kOneHour, 0, millis1898, 1, DateTimeRule::STANDARD_TIME);
+                TimeZoneRule* ruleFrom1912 = new TimeArrayTimeZoneRule(UNICODE_STRING_SIMPLE("Korean 1912-"), 9*kOneHour, 0, millis1912, 1, DateTimeRule::STANDARD_TIME);
                 UErrorCode status = U_ZERO_ERROR;
-                RuleBasedTimeZone* dangiCalZoneAstroCalc = new RuleBasedTimeZone(UnicodeString("KOREA_ZONE"), initialTimeZone); // adopts initialTimeZone
+                RuleBasedTimeZone* dangiCalZoneAstroCalc = new RuleBasedTimeZone(UNICODE_STRING_SIMPLE("KOREA_ZONE"), initialTimeZone); // adopts initialTimeZone
                 dangiCalZoneAstroCalc->addTransitionRule(rule1897, status); // adopts rule1897
                 dangiCalZoneAstroCalc->addTransitionRule(rule1898to1911, status);
                 dangiCalZoneAstroCalc->addTransitionRule(ruleFrom1912, status);
index 87b12c955d07775fcd105dfab39ee1b225db5c8a..71aac07f4e6601bb1d6e901862d95208e21a22a4 100644 (file)
@@ -56,9 +56,9 @@ static void initializeStatics() {
     Mutex m(&gInitMutex);
     UErrorCode status = U_ZERO_ERROR;
     if (gInclusionSet == NULL) {
-        gInclusionSet = new UnicodeSet(UnicodeString("["
+        gInclusionSet = new UnicodeSet(UNICODE_STRING_SIMPLE("["
             "\\-.\\u00B7\\u05F3\\u05F4\\u0F0B\\u200C\\u200D\\u2019]"), status);
-        gRecommendedSet = new UnicodeSet(UnicodeString("["
+        gRecommendedSet = new UnicodeSet(UNICODE_STRING_SIMPLE("["
             "[0-z\\u00C0-\\u017E\\u01A0\\u01A1\\u01AF\\u01B0\\u01CD-"
             "\\u01DC\\u01DE-\\u01E3\\u01E6-\\u01F5\\u01F8-\\u021B\\u021E"
             "\\u021F\\u0226-\\u0233\\u02BB\\u02BC\\u02EC\\u0300-\\u0304"