ICU-13029 Mark unmodified static data as const

X-SVN-Rev: 40065
This commit is contained in:
George Rhoten 2017-04-19 18:55:46 +00:00
parent 29490300c1
commit a82e70e5b1
8 changed files with 14 additions and 14 deletions

View file

@ -63,7 +63,7 @@ ListFormatInternal(const ListFormatInternal &other) :
static Hashtable* listPatternHash = NULL;
static UMutex listFormatterMutex = U_MUTEX_INITIALIZER;
static const char *STANDARD_STYLE = "standard";
static const char STANDARD_STYLE[] = "standard";
U_CDECL_BEGIN
static UBool U_CALLCONV uprv_listformatter_cleanup() {

View file

@ -1281,7 +1281,7 @@ uloc_minimizeSubtags(const char* localeID,
// Pairs of (language subtag, + or -) for finding out fast if common languages
// are LTR (minus) or RTL (plus).
static const char* LANG_DIR_STRING =
static const char LANG_DIR_STRING[] =
"root-en-es-pt-zh-ja-ko-de-fr-it-ar+he+fa+ru-nl-pl-th-tr-";
// Implemented here because this calls uloc_addLikelySubtags().

View file

@ -24,8 +24,8 @@ static UConditionVar gInProgressValueAddedCond = U_CONDITION_INITIALIZER;
static icu::UInitOnce gCacheInitOnce = U_INITONCE_INITIALIZER;
static const int32_t MAX_EVICT_ITERATIONS = 10;
static int32_t DEFAULT_MAX_UNUSED = 1000;
static int32_t DEFAULT_PERCENTAGE_OF_IN_USE = 100;
static const int32_t DEFAULT_MAX_UNUSED = 1000;
static const int32_t DEFAULT_PERCENTAGE_OF_IN_USE = 100;
U_CDECL_BEGIN

View file

@ -22,12 +22,12 @@
#include "uassert.h"
#include "unistrappender.h"
static UChar gDefaultSymbols[] = {0xa4, 0xa4, 0xa4};
static const UChar gDefaultSymbols[] = {0xa4, 0xa4, 0xa4};
static UChar gPercent = 0x25;
static UChar gPerMill = 0x2030;
static UChar gNegative = 0x2D;
static UChar gPositive = 0x2B;
static const UChar gPercent = 0x25;
static const UChar gPerMill = 0x2030;
static const UChar gNegative = 0x2D;
static const UChar gPositive = 0x2B;
#define PACK_TOKEN_AND_LENGTH(t, l) ((UChar) (((t) << 8) | (l & 0xFF)))

View file

@ -71,7 +71,7 @@ static const UChar gStrictDashEquivalentsPattern[] = {
// [ \ - MINUS ]
0x005B, 0x005C, 0x002D, 0x2212, 0x005D, 0x0000};
static UChar32 gMinusSigns[] = {
static const UChar32 gMinusSigns[] = {
0x002D,
0x207B,
0x208B,
@ -80,7 +80,7 @@ static UChar32 gMinusSigns[] = {
0xFE63,
0xFF0D};
static UChar32 gPlusSigns[] = {
static const UChar32 gPlusSigns[] = {
0x002B,
0x207A,
0x208A,

View file

@ -560,7 +560,7 @@ struct RelDateTimeFmtDataSink : public ResourceSink {
RelDateTimeFmtDataSink::~RelDateTimeFmtDataSink() {}
} // namespace
DateFormatSymbols::DtWidthType styleToDateFormatSymbolWidth[UDAT_STYLE_COUNT] = {
static const DateFormatSymbols::DtWidthType styleToDateFormatSymbolWidth[UDAT_STYLE_COUNT] = {
DateFormatSymbols::WIDE, DateFormatSymbols::SHORT, DateFormatSymbols::NARROW
};

View file

@ -2200,7 +2200,7 @@ int32_t RegexMatcher::split(UText *input,
if (dest[i] == NULL) {
dest[i] = utext_openUChars(NULL, NULL, 0, &status);
} else {
static UChar emptyString[] = {(UChar)0};
static const UChar emptyString[] = {(UChar)0};
utext_replace(dest[i], 0, utext_nativeLength(dest[i]), emptyString, 0, &status);
}
}

View file

@ -69,7 +69,7 @@ enum UTimeZoneNameTypeIndex {
UTZNM_INDEX_SHORT_DAYLIGHT,
UTZNM_INDEX_COUNT
};
static const UChar* EMPTY_NAMES[UTZNM_INDEX_COUNT] = {0,0,0,0,0,0,0};
static const UChar* const EMPTY_NAMES[UTZNM_INDEX_COUNT] = {0,0,0,0,0,0,0};
U_CDECL_BEGIN
static UBool U_CALLCONV tzdbTimeZoneNames_cleanup(void) {