diff --git a/icu4c/source/common/unicode/bytestriebuilder.h b/icu4c/source/common/unicode/bytestriebuilder.h index c202e5ad35c..4e00e0f73dd 100644 --- a/icu4c/source/common/unicode/bytestriebuilder.h +++ b/icu4c/source/common/unicode/bytestriebuilder.h @@ -31,7 +31,6 @@ U_NAMESPACE_BEGIN class BytesTrieElement; class CharString; - /** * Builder class for BytesTrie. * @@ -143,7 +142,7 @@ private: virtual int32_t getMinLinearMatch() const { return BytesTrie::kMinLinearMatch; } virtual int32_t getMaxLinearMatchLength() const { return BytesTrie::kMaxLinearMatchLength; } - // don't use #ifndef U_HIDE_INTERNAL_API with private class members + #ifndef U_HIDE_INTERNAL_API /** * @internal */ @@ -155,7 +154,8 @@ private: private: const char *s; }; - +#endif + // don't use #ifndef U_HIDE_INTERNAL_API with private class members or virtual methods. virtual Node *createLinearMatchNode(int32_t i, int32_t byteIndex, int32_t length, Node *nextNode) const; diff --git a/icu4c/source/common/unicode/ucharstriebuilder.h b/icu4c/source/common/unicode/ucharstriebuilder.h index cc9fb77a917..aa7c4f2d17c 100644 --- a/icu4c/source/common/unicode/ucharstriebuilder.h +++ b/icu4c/source/common/unicode/ucharstriebuilder.h @@ -150,6 +150,7 @@ private: virtual int32_t getMinLinearMatch() const { return UCharsTrie::kMinLinearMatch; } virtual int32_t getMaxLinearMatchLength() const { return UCharsTrie::kMaxLinearMatchLength; } +#ifndef U_HIDE_INTERNAL_API class UCTLinearMatchNode : public LinearMatchNode { public: UCTLinearMatchNode(const UChar *units, int32_t len, Node *nextNode); @@ -158,6 +159,7 @@ private: private: const UChar *s; }; +#endif virtual Node *createLinearMatchNode(int32_t i, int32_t unitIndex, int32_t length, Node *nextNode) const; diff --git a/icu4c/source/common/unicode/unistr.h b/icu4c/source/common/unicode/unistr.h index 22b41298324..c09ec58475f 100644 --- a/icu4c/source/common/unicode/unistr.h +++ b/icu4c/source/common/unicode/unistr.h @@ -1936,7 +1936,6 @@ public: * @draft ICU 56 */ void swap(UnicodeString &other) U_NOEXCEPT; -#endif /* U_HIDE_DRAFT_API */ /** * Non-member UnicodeString swap function. @@ -1948,6 +1947,7 @@ public: swap(UnicodeString &s1, UnicodeString &s2) U_NOEXCEPT { s1.swap(s2); } +#endif /* U_HIDE_DRAFT_API */ /** * Assignment operator. Replace the characters in this UnicodeString