From b69d78b0e8cc6397e249cf53ebb7e3e4ee929ebe Mon Sep 17 00:00:00 2001 From: Peter Edberg Date: Thu, 1 Mar 2018 07:21:19 +0000 Subject: [PATCH] ICU-12740 use private static const int32_t, not #define, for UDATPG_WIDTH_COUNT X-SVN-Rev: 41035 --- icu4c/source/i18n/dtptngen.cpp | 2 +- icu4c/source/i18n/unicode/dtptngen.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/icu4c/source/i18n/dtptngen.cpp b/icu4c/source/i18n/dtptngen.cpp index 7336dd39e9..6066de6084 100644 --- a/icu4c/source/i18n/dtptngen.cpp +++ b/icu4c/source/i18n/dtptngen.cpp @@ -267,7 +267,7 @@ static const char* const CLDR_FIELD_NAME[UDATPG_FIELD_COUNT] = { "hour", "minute", "second", "*", "zone" }; -static const char* const CLDR_FIELD_WIDTH[UDATPG_WIDTH_COUNT] = { +static const char* const CLDR_FIELD_WIDTH[] = { // [UDATPG_WIDTH_COUNT] "", "-short", "-narrow" }; diff --git a/icu4c/source/i18n/unicode/dtptngen.h b/icu4c/source/i18n/unicode/dtptngen.h index b19f22282e..20e276a1b5 100644 --- a/icu4c/source/i18n/unicode/dtptngen.h +++ b/icu4c/source/i18n/unicode/dtptngen.h @@ -522,13 +522,14 @@ private: */ DateTimePatternGenerator& operator=(const DateTimePatternGenerator& other); + static const int32_t UDATPG_WIDTH_COUNT = UDATPG_NARROW + 1; + Locale pLocale; // pattern locale FormatParser *fp; DateTimeMatcher* dtMatcher; DistanceInfo *distanceInfo; PatternMap *patternMap; UnicodeString appendItemFormats[UDATPG_FIELD_COUNT]; - #define UDATPG_WIDTH_COUNT (UDATPG_NARROW + 1) UnicodeString fieldDisplayNames[UDATPG_FIELD_COUNT][UDATPG_WIDTH_COUNT]; UnicodeString dateTimeFormat; UnicodeString decimal;