From: Peter Edberg Date: Wed, 9 Mar 2022 05:38:29 +0000 (-0800) Subject: ICU-13619 Now that UDATPG_NARROW is @stable, can reference it in header X-Git-Tag: release-71-rc~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df6a8c877c76a120846323e7662016d534d0690f;p=icu ICU-13619 Now that UDATPG_NARROW is @stable, can reference it in header --- diff --git a/icu4c/source/i18n/dtptngen.cpp b/icu4c/source/i18n/dtptngen.cpp index 10d4a3c8879..e781c6e26f5 100644 --- a/icu4c/source/i18n/dtptngen.cpp +++ b/icu4c/source/i18n/dtptngen.cpp @@ -273,8 +273,6 @@ static const char* const CLDR_FIELD_WIDTH[] = { // [UDATPG_WIDTH_COUNT] "", "-short", "-narrow" }; -// TODO(ticket:13619): remove when definition uncommented in dtptngen.h. -static const int32_t UDATPG_WIDTH_COUNT = UDATPG_NARROW + 1; static constexpr UDateTimePGDisplayWidth UDATPG_WIDTH_APPENDITEM = UDATPG_WIDE; static constexpr int32_t UDATPG_FIELD_KEY_MAX = 24; // max length of CLDR field tag (type + width) diff --git a/icu4c/source/i18n/unicode/dtptngen.h b/icu4c/source/i18n/unicode/dtptngen.h index 0b6390537be..6be0e2a571c 100644 --- a/icu4c/source/i18n/unicode/dtptngen.h +++ b/icu4c/source/i18n/unicode/dtptngen.h @@ -605,8 +605,7 @@ private: */ DateTimePatternGenerator& operator=(const DateTimePatternGenerator& other); - // TODO(ticket:13619): re-enable when UDATPG_NARROW no longer in draft mode. - // static const int32_t UDATPG_WIDTH_COUNT = UDATPG_NARROW + 1; + static const int32_t UDATPG_WIDTH_COUNT = UDATPG_NARROW + 1; Locale pLocale; // pattern locale FormatParser *fp; @@ -614,8 +613,7 @@ private: DistanceInfo *distanceInfo; PatternMap *patternMap; UnicodeString appendItemFormats[UDATPG_FIELD_COUNT]; - // TODO(ticket:13619): [3] -> UDATPG_WIDTH_COUNT - UnicodeString fieldDisplayNames[UDATPG_FIELD_COUNT][3]; + UnicodeString fieldDisplayNames[UDATPG_FIELD_COUNT][UDATPG_WIDTH_COUNT]; UnicodeString dateTimeFormat[4]; UnicodeString decimal; DateTimeMatcher *skipMatcher;