From 25221133789e194b5b17427a095037cb84f1bbeb Mon Sep 17 00:00:00 2001 From: Jungshik Shin Date: Wed, 23 Mar 2016 20:57:17 +0000 Subject: [PATCH] ICU-12408 static UnicodeString RANGE_MARKER_STRING is bad X-SVN-Rev: 38564 --- icu4c/source/i18n/region.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/icu4c/source/i18n/region.cpp b/icu4c/source/i18n/region.cpp index 085f7043499..8e1ee611e9a 100644 --- a/icu4c/source/i18n/region.cpp +++ b/icu4c/source/i18n/region.cpp @@ -1,6 +1,6 @@ /* ******************************************************************************* -* Copyright (C) 2014-2015, International Business Machines Corporation and +* Copyright (C) 2014-2016, International Business Machines Corporation and * others. All Rights Reserved. ******************************************************************************* * @@ -67,8 +67,7 @@ static UVector *allRegions = NULL; 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" */ -static const UChar RANGE_MARKER [] = { 0x7e, 0 }; /* "~" */ -static const UnicodeString RANGE_MARKER_STRING(RANGE_MARKER); +static const UChar RANGE_MARKER = 0x7E; /* '~' */ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(RegionNameEnumeration) @@ -121,7 +120,7 @@ void Region::loadRegionData(UErrorCode &status) { while ( ures_hasNext(regionRegular.getAlias()) ) { UnicodeString regionName = ures_getNextUnicodeString(regionRegular.getAlias(),NULL,&status); - int32_t rangeMarkerLocation = regionName.indexOf(RANGE_MARKER_STRING); + int32_t rangeMarkerLocation = regionName.indexOf(RANGE_MARKER); UChar buf[6]; regionName.extract(buf,6,status); if ( rangeMarkerLocation > 0 ) { @@ -140,7 +139,7 @@ void Region::loadRegionData(UErrorCode &status) { while ( ures_hasNext(regionMacro.getAlias()) ) { UnicodeString regionName = ures_getNextUnicodeString(regionMacro.getAlias(),NULL,&status); - int32_t rangeMarkerLocation = regionName.indexOf(RANGE_MARKER_STRING); + int32_t rangeMarkerLocation = regionName.indexOf(RANGE_MARKER); UChar buf[6]; regionName.extract(buf,6,status); if ( rangeMarkerLocation > 0 ) { -- 2.40.0