]> granicus.if.org Git - icu/commitdiff
ICU-13619 Now that UDATPG_NARROW is @stable, can reference it in header
authorPeter Edberg <pedberg@unicode.org>
Wed, 9 Mar 2022 05:38:29 +0000 (21:38 -0800)
committerPeter Edberg <42151464+pedberg-icu@users.noreply.github.com>
Fri, 11 Mar 2022 21:06:50 +0000 (13:06 -0800)
icu4c/source/i18n/dtptngen.cpp
icu4c/source/i18n/unicode/dtptngen.h

index 10d4a3c8879a549f6806b8977c43ee77a05e1e5f..e781c6e26f5fcbbb94c4eb6c1e38eecb52a416bb 100644 (file)
@@ -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)
 
index 0b6390537be98ed18cdabeb0adaea25a58f36088..6be0e2a571c7bbab83d5881f1401e579832ebae9 100644 (file)
@@ -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;