ICU-8451 Remove UnicodeString static initializers
X-SVN-Rev: 33122
This commit is contained in:
parent
2b96793827
commit
d0ae818a67
@ -63,9 +63,9 @@ static UHashtable *regionAliases;
|
||||
static UHashtable *regionIDMap;
|
||||
static UHashtable *numericCodeMap;
|
||||
|
||||
static UnicodeString UNKNOWN_REGION_ID = UNICODE_STRING_SIMPLE("ZZ");
|
||||
static UnicodeString OUTLYING_OCEANIA_REGION_ID = UNICODE_STRING_SIMPLE("QO");
|
||||
static UnicodeString WORLD_ID = UNICODE_STRING_SIMPLE("001");
|
||||
static const UChar UNKNOWN_REGION_ID [] = { 0x5A, 0x5A, 0 }; /* "ZZ" */
|
||||
static const UChar OUTLYING_OCEANIA_REGION_ID [] = { 0x51, 0x4F, 0 }; /* "QO" */
|
||||
static const UChar WORLD_ID [] = { 0x30, 0x30, 0x31, 0 }; /* "001" */
|
||||
|
||||
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Region)
|
||||
UOBJECT_DEFINE_RTTI_IMPLEMENTATION(RegionNameEnumeration)
|
||||
@ -240,12 +240,14 @@ void Region::loadRegionData() {
|
||||
|
||||
// Now fill in the special cases for WORLD, UNKNOWN, CONTINENTS, and GROUPINGS
|
||||
Region *r;
|
||||
r = (Region *) uhash_get(regionIDMap,(void *)&WORLD_ID);
|
||||
UnicodeString WORLD_ID_STRING(WORLD_ID);
|
||||
r = (Region *) uhash_get(regionIDMap,(void *)&WORLD_ID_STRING);
|
||||
if ( r ) {
|
||||
r->type = URGN_WORLD;
|
||||
}
|
||||
|
||||
r = (Region *) uhash_get(regionIDMap,(void *)&UNKNOWN_REGION_ID);
|
||||
UnicodeString UNKNOWN_REGION_ID_STRING(UNKNOWN_REGION_ID);
|
||||
r = (Region *) uhash_get(regionIDMap,(void *)&UNKNOWN_REGION_ID_STRING);
|
||||
if ( r ) {
|
||||
r->type = URGN_UNKNOWN;
|
||||
}
|
||||
@ -269,7 +271,8 @@ void Region::loadRegionData() {
|
||||
// Special case: The region code "QO" (Outlying Oceania) is a subcontinent code added by CLDR
|
||||
// even though it looks like a territory code. Need to handle it here.
|
||||
|
||||
r = (Region *) uhash_get(regionIDMap,(void *)&OUTLYING_OCEANIA_REGION_ID);
|
||||
UnicodeString OUTLYING_OCEANIA_REGION_ID_STRING(OUTLYING_OCEANIA_REGION_ID);
|
||||
r = (Region *) uhash_get(regionIDMap,(void *)&OUTLYING_OCEANIA_REGION_ID_STRING);
|
||||
if ( r ) {
|
||||
r->type = URGN_SUBCONTINENT;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user