diff --git a/icu4c/source/common/brkiter.cpp b/icu4c/source/common/brkiter.cpp index 85028cb3f2e..e8b10f78d27 100644 --- a/icu4c/source/common/brkiter.cpp +++ b/icu4c/source/common/brkiter.cpp @@ -42,8 +42,6 @@ U_NAMESPACE_BEGIN -const int32_t BreakIterator::DONE = (int32_t)-1; - // ------------------------------------- BreakIterator* diff --git a/icu4c/source/common/unicode/brkiter.h b/icu4c/source/common/unicode/brkiter.h index 33eb160e8ce..72d66f932fc 100644 --- a/icu4c/source/common/unicode/brkiter.h +++ b/icu4c/source/common/unicode/brkiter.h @@ -1,6 +1,6 @@ /* ******************************************************************************** -* Copyright (C) 1997-2004, International Business Machines +* Copyright (C) 1997-2005, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************** * @@ -271,16 +271,14 @@ public: */ virtual void adoptText(CharacterIterator* it) = 0; - /** - * DONE is returned by previous() and next() after all valid - * boundaries have been returned. - * @stable ICU 2.0 - */ -#ifdef U_CYGWIN - static U_COMMON_API const int32_t DONE; -#else - static const int32_t DONE; -#endif + enum { + /** + * DONE is returned by previous() and next() after all valid + * boundaries have been returned. + * @stable ICU 2.0 + */ + DONE = (int32_t)-1 + }; /** * Return the index of the first character in the text being scanned. diff --git a/icu4c/source/common/unicode/uniset.h b/icu4c/source/common/unicode/uniset.h index 3e330e2b9a1..9e45b52f1cb 100644 --- a/icu4c/source/common/unicode/uniset.h +++ b/icu4c/source/common/unicode/uniset.h @@ -276,25 +276,19 @@ class U_COMMON_API UnicodeSet : public UnicodeFilter { public: - /** - * Minimum value that can be stored in a UnicodeSet. - * @stable ICU 2.4 - */ -#ifdef U_CYGWIN - static U_COMMON_API const UChar32 MIN_VALUE; -#else - static const UChar32 MIN_VALUE; -#endif + enum { + /** + * Minimum value that can be stored in a UnicodeSet. + * @stable ICU 2.4 + */ + MIN_VALUE = 0, - /** - * Maximum value that can be stored in a UnicodeSet. - * @stable ICU 2.4 - */ -#ifdef U_CYGWIN - static U_COMMON_API const UChar32 MAX_VALUE; -#else - static const UChar32 MAX_VALUE; -#endif + /** + * Maximum value that can be stored in a UnicodeSet. + * @stable ICU 2.4 + */ + MAX_VALUE = 0x10ffff + }; //---------------------------------------------------------------- // Constructors &c diff --git a/icu4c/source/common/uniset.cpp b/icu4c/source/common/uniset.cpp index 07794e70519..e93462d7a82 100644 --- a/icu4c/source/common/uniset.cpp +++ b/icu4c/source/common/uniset.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 1999-2004, International Business Machines +* Copyright (C) 1999-2005, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -57,16 +57,6 @@ U_NAMESPACE_BEGIN SymbolTable::~SymbolTable() {} -/** - * Minimum value that can be stored in a UnicodeSet. - */ -const UChar32 UnicodeSet::MIN_VALUE = UNICODESET_LOW; - -/** - * Maximum value that can be stored in a UnicodeSet. - */ -const UChar32 UnicodeSet::MAX_VALUE = UNICODESET_HIGH - 1; - UOBJECT_DEFINE_RTTI_IMPLEMENTATION(UnicodeSet) /** diff --git a/icu4c/source/i18n/nultrans.cpp b/icu4c/source/i18n/nultrans.cpp index 1e1010e6d6e..efa5c87a015 100644 --- a/icu4c/source/i18n/nultrans.cpp +++ b/icu4c/source/i18n/nultrans.cpp @@ -18,13 +18,7 @@ U_NAMESPACE_BEGIN UOBJECT_DEFINE_RTTI_IMPLEMENTATION(NullTransliterator) -// "Any-Null" -const UChar NullTransliterator::ID[] = {65,110,121,45,0x4E, 0x75, 0x6C, 0x6C, 0x00}; - -// "Null" -const UChar NullTransliterator::SHORT_ID[] = {0x4E, 0x75, 0x6C, 0x6C, 0x00}; - -NullTransliterator::NullTransliterator() : Transliterator(ID, 0) {} +NullTransliterator::NullTransliterator() : Transliterator(UNICODE_STRING_SIMPLE("Any-Null"), 0) {} NullTransliterator::~NullTransliterator() {} diff --git a/icu4c/source/i18n/nultrans.h b/icu4c/source/i18n/nultrans.h index 3af6939d1f0..ce7a427df13 100644 --- a/icu4c/source/i18n/nultrans.h +++ b/icu4c/source/i18n/nultrans.h @@ -27,18 +27,6 @@ class U_I18N_API NullTransliterator : public Transliterator { public: - /** - * ID for this transliterator. - * @internal Use transliterator factory methods instead since this class will be removed in that release. - */ - static const UChar ID[]; // public for Transliterator - - /** - * ID for this transliterator. - * @internal Use transliterator factory methods instead since this class will be removed in that release. - */ - static const UChar SHORT_ID[]; // public for Transliterator - /** * Constructs a transliterator. * @internal Use transliterator factory methods instead since this class will be removed in that release. diff --git a/icu4c/source/i18n/translit.cpp b/icu4c/source/i18n/translit.cpp index 734fe3e1c55..4e1e5ca1aa4 100644 --- a/icu4c/source/i18n/translit.cpp +++ b/icu4c/source/i18n/translit.cpp @@ -1526,8 +1526,8 @@ UBool Transliterator::initializeRegistry() { NormalizationTransliterator::registerIDs(); AnyTransliterator::registerIDs(); - _registerSpecialInverse(NullTransliterator::SHORT_ID, - NullTransliterator::SHORT_ID, FALSE); + _registerSpecialInverse(UNICODE_STRING_SIMPLE("Null"), + UNICODE_STRING_SIMPLE("Null"), FALSE); _registerSpecialInverse(UNICODE_STRING_SIMPLE("Upper"), UNICODE_STRING_SIMPLE("Lower"), TRUE); _registerSpecialInverse(UNICODE_STRING_SIMPLE("Title"), diff --git a/icu4c/source/i18n/transreg.cpp b/icu4c/source/i18n/transreg.cpp index 4586f0211ea..854b7fc758d 100644 --- a/icu4c/source/i18n/transreg.cpp +++ b/icu4c/source/i18n/transreg.cpp @@ -535,7 +535,7 @@ Transliterator* TransliteratorRegistry::reget(const UnicodeString& ID, // No idBlock, no data -- this is just an // alias for Null entry->entryType = Entry::ALIAS; - entry->stringArg = NullTransliterator::ID; + entry->stringArg = UNICODE_STRING_SIMPLE("Any-Null"); } else { // No idBlock, data != 0 -- this is an // ordinary RBT_DATA