]> granicus.if.org Git - icu/commitdiff
ICU-20439 Fix internal and draft headers.
authorShane Carr <shane@unicode.org>
Sat, 23 Mar 2019 04:34:56 +0000 (21:34 -0700)
committerShane F. Carr <shane@unicode.org>
Mon, 25 Mar 2019 14:37:35 +0000 (07:37 -0700)
icu4c/source/i18n/numsys.cpp
icu4c/source/i18n/unicode/numberformatter.h
icu4c/source/i18n/unicode/numsys.h
icu4c/source/i18n/unicode/reldatefmt.h
icu4c/source/test/hdrtst/cxxfiles.txt

index 50be63e7b93c6625431f754ed92db0a763ff2e23..d420151b1b50ba8b4c7fa6102850eb6010222341 100644 (file)
@@ -260,8 +260,8 @@ void NumberingSystem::setName(const char *n) {
     if ( n == nullptr ) {
         name[0] = (char) 0;
     } else {
-        uprv_strncpy(name,n,NUMSYS_NAME_CAPACITY);
-        name[NUMSYS_NAME_CAPACITY] = '\0'; // Make sure it is null terminated.
+        uprv_strncpy(name,n,kInternalNumSysNameCapacity);
+        name[kInternalNumSysNameCapacity] = '\0'; // Make sure it is null terminated.
     }
 }
 UBool NumberingSystem::isAlgorithmic() const {
index 72f474886a079ecf0299bfc6e87b4fdadf0d4346..e9fe39a931666546357cdbcf22ec5de279c48df2 100644 (file)
@@ -112,7 +112,7 @@ class IntegerWidth;
 
 namespace impl {
 
-#ifndef U_HIDE_INTERNAL_API
+// can't be #ifndef U_HIDE_INTERNAL_API; referenced throughout this file in public classes
 /**
  * Datatype for minimum/maximum fraction digits. Must be able to hold kMaxIntFracSig.
  *
@@ -120,14 +120,14 @@ namespace impl {
  */
 typedef int16_t digits_t;
 
+// can't be #ifndef U_HIDE_INTERNAL_API; needed for struct initialization
 /**
  * Use a default threshold of 3. This means that the third time .format() is called, the data structures get built
  * using the "safe" code path. The first two calls to .format() will trigger the unsafe code path.
  *
  * @internal
  */
-static constexpr int32_t DEFAULT_THRESHOLD = 3;
-#endif  /* U_HIDE_INTERNAL_API */
+static constexpr int32_t kInternalDefaultThreshold = 3;
 
 // Forward declarations:
 class Padder;
@@ -1411,7 +1411,7 @@ struct U_I18N_API MacroProps : public UMemory {
     const CurrencySymbols* currencySymbols = nullptr;  // no ownership
 
     /** @internal */
-    int32_t threshold = DEFAULT_THRESHOLD;
+    int32_t threshold = kInternalDefaultThreshold;
 
     /** @internal */
     Locale locale;
index 5e14ea5c3111eff89c3bdf192d519848844faf16..0ced6f4cfa6f68701e746a997c5fe1b900cf362e 100644 (file)
 
 #include "unicode/utypes.h"
 
-#ifndef U_HIDE_INTERNAL_API
-/**
- * \def NUMSYS_NAME_CAPACITY
- * Size of a numbering system name.
- * @internal
- */
-#define NUMSYS_NAME_CAPACITY 8
-#endif  /* U_HIDE_INTERNAL_API */
-
-
 /**
  * \file
  * \brief C++ API: NumberingSystem object
 
 #if !UCONFIG_NO_FORMATTING
 
-
 #include "unicode/format.h"
 #include "unicode/uobject.h"
 
 U_NAMESPACE_BEGIN
 
+// can't be #ifndef U_HIDE_INTERNAL_API; needed for char[] field size
+/**
+ * Size of a numbering system name.
+ * @internal
+ */
+constexpr const size_t kInternalNumSysNameCapacity = 8;
+
 /**
  * Defines numbering systems. A numbering system describes the scheme by which 
  * numbers are to be presented to the end user.  In its simplest form, a numbering
@@ -195,7 +191,7 @@ private:
     UnicodeString   desc;
     int32_t         radix;
     UBool           algorithmic;
-    char            name[NUMSYS_NAME_CAPACITY+1];
+    char            name[kInternalNumSysNameCapacity+1];
 
     void setRadix(int32_t radix);
 
index 32344cd5f18d6a0bb56c180f1293f2dae0ce3f4a..16ae91ad034c3622cbe554c38b8cee2a5d739e29 100644 (file)
@@ -708,11 +708,13 @@ private:
             UErrorCode& status,
             Args... args) const;
 
+#ifndef U_HIDE_DRAFT_API  // for FormattedRelativeDateTime
     template<typename F, typename... Args>
     FormattedRelativeDateTime doFormatToValue(
             F callback,
             UErrorCode& status,
             Args... args) const;
+#endif  // U_HIDE_DRAFT_API
 
     void formatImpl(
             double quantity,
index 4c06badc6b7dd887095370bb75fb2ff04d6b52fa..02151debd6a4a43ddc2363bd995d0e1833142881 100644 (file)
@@ -53,11 +53,13 @@ fieldpos.h
 filteredbrk.h
 fmtable.h
 format.h
+formattedvalue.h
 fpositer.h
 gender.h
 gregocal.h
 idna.h
 listformatter.h
+localebuilder.h
 locdspnm.h
 locid.h
 measfmt.h