From 80c3feb89f0baa252776762f33236585fcecbeee Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Fri, 11 Aug 2000 21:56:35 +0000 Subject: [PATCH] ICU-535 fixed some compiler warnings X-SVN-Rev: 2208 --- icu4c/source/common/normlzr.cpp | 2 +- icu4c/source/common/unicode/convert.h | 8 +-- icu4c/source/common/unicode/normlzr.h | 94 +++++++++++++-------------- 3 files changed, 52 insertions(+), 52 deletions(-) diff --git a/icu4c/source/common/normlzr.cpp b/icu4c/source/common/normlzr.cpp index 2180a9ea004..a68f9645cc0 100644 --- a/icu4c/source/common/normlzr.cpp +++ b/icu4c/source/common/normlzr.cpp @@ -616,7 +616,7 @@ void Normalizer::explode(UnicodeString& target, uint16_t index) { UChar Normalizer::pairExplode(UnicodeString& target, uint16_t action) { uint16_t index = ComposeData::actionIndex[action - ComposeData::MAX_COMPOSED]; - explode(target, index + 1); + explode(target, (uint16_t)(index + 1)); return ComposeData::replace[index]; // New base char } diff --git a/icu4c/source/common/unicode/convert.h b/icu4c/source/common/unicode/convert.h index bd3931dd6e2..a3a8500d33d 100644 --- a/icu4c/source/common/unicode/convert.h +++ b/icu4c/source/common/unicode/convert.h @@ -143,7 +143,7 @@ void fromUnicode(char*& target, const char* targetLimit, const UChar*& source, const UChar* sourceLimit, - int32_t * offsets, + int32_t * offsets, UBool flush, UErrorCode& err); @@ -171,7 +171,7 @@ void fromUnicode(char*& target, const UChar* targetLimit, const char*& source, const char* sourceLimit, - int32_t * offsets, + int32_t * offsets, UBool flush, UErrorCode& err); @@ -212,7 +212,7 @@ UConverterType getType(void) const; * @stable */ void getStarters(UBool starters[256], - UErrorCode& err) const; + UErrorCode& err) const; /** * Fills in the output parameter, subChars, with the substitution characters * as multiple bytes. @@ -387,6 +387,6 @@ UBool isAmbiguous(void) const; }; -typedef UnicodeConverter UnicodeConverterCPP; /* Backwards compatibility. */ +typedef UnicodeConverter UnicodeConverterCPP; /* Backwards compatibility. */ #endif diff --git a/icu4c/source/common/unicode/normlzr.h b/icu4c/source/common/unicode/normlzr.h index 38c1aafd8c7..a3b783304ff 100644 --- a/icu4c/source/common/unicode/normlzr.h +++ b/icu4c/source/common/unicode/normlzr.h @@ -153,7 +153,7 @@ class U_COMMON_API Normalizer * @see #setMode */ COMPOSE = COMPOSE_BIT, - + /** * Compatibility decomposition followed by canonical composition. * Used with the {@link #Normalizer constructors} and the static @@ -169,7 +169,7 @@ class U_COMMON_API Normalizer * @see #setMode */ COMPOSE_COMPAT = COMPOSE_BIT | COMPAT_BIT, - + /** * Canonical decomposition. This value is passed to the * {@link #Normalizer constructors} and the static @@ -185,7 +185,7 @@ class U_COMMON_API Normalizer * @see #setMode */ DECOMP = DECOMP_BIT, - + /** * Compatibility decomposition. This value is passed to the * {@link #Normalizer constructors} and the static @@ -227,7 +227,7 @@ class U_COMMON_API Normalizer }; // Constructors - + /** * Creates a new Normalizer object for iterating over the * normalized form of a given string. @@ -262,7 +262,7 @@ class U_COMMON_API Normalizer Normalizer(const UnicodeString& str, EMode mode, int32_t opt); - + /** * Creates a new Normalizer object for iterating over the * normalized form of a given UChar string. @@ -298,7 +298,7 @@ class U_COMMON_API Normalizer Normalizer(const UChar* str, int32_t length, EMode mode, - int32_t option); + int32_t option); /** * Creates a new Normalizer object for iterating over the @@ -313,7 +313,7 @@ class U_COMMON_API Normalizer */ Normalizer(const CharacterIterator& iter, EMode mode); - + /** * Creates a new Normalizer object for iterating over the * normalized form of the given text. @@ -332,24 +332,24 @@ class U_COMMON_API Normalizer Normalizer(const CharacterIterator& iter, EMode mode, int32_t opt); - + /** * Copy constructor. * @stable */ Normalizer(const Normalizer& copy); - + /** * Destructor * @stable */ ~Normalizer(); - - + + //------------------------------------------------------------------------- // Static utility methods //------------------------------------------------------------------------- - + /** * Normalizes a String using the given normalization operation. *

@@ -375,7 +375,7 @@ class U_COMMON_API Normalizer int32_t options, UnicodeString& result, UErrorCode &status); - + /** * Compose a String. *

@@ -404,7 +404,7 @@ class U_COMMON_API Normalizer int32_t options, UnicodeString& result, UErrorCode &status); - + /** * Static method to decompose a String. *

@@ -447,7 +447,7 @@ class U_COMMON_API Normalizer * @draft */ UChar32 current(void) const; - + /** * Return the first character in the normalized text. This resets * the Normalizer's position to the beginning of the text. @@ -462,7 +462,7 @@ class U_COMMON_API Normalizer * @draft */ UChar32 last(void); - + /** * Return the next character in the normalized text and advance * the iteration position by one. If the end @@ -470,7 +470,7 @@ class U_COMMON_API Normalizer * @draft */ UChar32 next(void); - + /** * Return the previous character in the normalized text and decrement * the iteration position by one. If the beginning @@ -478,7 +478,7 @@ class U_COMMON_API Normalizer * @draft */ UChar32 previous(void); - + /** * Set the iteration position in the input text that is being normalized * and return the first normalized character at that position. @@ -497,7 +497,7 @@ class U_COMMON_API Normalizer * @draft */ UChar32 setIndex(UTextOffset index); - + /** * Reset the iterator so that it is in the same state that it was just after * it was constructed. A subsequent call to next will return the first @@ -507,7 +507,7 @@ class U_COMMON_API Normalizer * @stable */ void reset(void); - + /** * Retrieve the current iteration position in the input text that is * being normalized. This method is useful in applications such as @@ -523,7 +523,7 @@ class U_COMMON_API Normalizer * @stable */ UTextOffset getIndex(void) const; - + /** * Retrieve the index of the start of the input text. This is the begin index * of the CharacterIterator or the start (i.e. 0) of the String @@ -531,7 +531,7 @@ class U_COMMON_API Normalizer * @stable */ UTextOffset startIndex(void) const; - + /** * Retrieve the index of the end of the input text. This is the end index * of the CharacterIterator or the length of the String @@ -539,8 +539,8 @@ class U_COMMON_API Normalizer * @stable */ UTextOffset endIndex(void) const; - - + + /** * Returns true when both iterators refer to the same character in the same * character-storage object. @@ -549,14 +549,14 @@ class U_COMMON_API Normalizer // virtual UBool operator==(const CharacterIterator& that) const; UBool operator==(const Normalizer& that) const; inline UBool operator!=(const Normalizer& that) const; - + /** * Returns a pointer to a new Normalizer that is a clone of this one. * The caller is responsible for deleting the new clone. * @stable */ Normalizer* clone(void) const; - + /** * Generates a hash code for this iterator. * @stable @@ -566,7 +566,7 @@ class U_COMMON_API Normalizer //------------------------------------------------------------------------- // Property access methods //------------------------------------------------------------------------- - + /** * Set the normalization mode for this object. *

@@ -594,7 +594,7 @@ class U_COMMON_API Normalizer * @stable */ void setMode(EMode newMode); - + /** * Return the basic operation performed by this Normalizer * @@ -602,7 +602,7 @@ class U_COMMON_API Normalizer * @stable */ EMode getMode(void) const; - + /** * Set options that affect this Normalizer's operation. * Options do not change the basic composition or decomposition operation @@ -628,7 +628,7 @@ class U_COMMON_API Normalizer */ void setOption(int32_t option, UBool value); - + /** * Determine whether an option is turned on or off. *

@@ -636,7 +636,7 @@ class U_COMMON_API Normalizer * @stable */ UBool getOption(int32_t option) const; - + /** * Set the input text over which this Normalizer will iterate. * The iteration position is set to the beginning. @@ -644,7 +644,7 @@ class U_COMMON_API Normalizer */ void setText(const UnicodeString& newText, UErrorCode &status); - + /** * Set the input text over which this Normalizer will iterate. * The iteration position is set to the beginning. @@ -652,7 +652,7 @@ class U_COMMON_API Normalizer */ void setText(const CharacterIterator& newText, UErrorCode &status); - + /** * Set the input text over which this Normalizer will iterate. * The iteration position is set to the beginning. @@ -668,7 +668,7 @@ class U_COMMON_API Normalizer * @draft should also return the result UnicodeString & */ void getText(UnicodeString& result); - + /** * Returns the text under iteration into the UChar* buffer pointer. * @param result Receives a copy of the text under iteration. @@ -683,16 +683,16 @@ private: UChar prevCompose(void); UChar nextDecomp(void); UChar prevDecomp(void); - + UChar curForward(void); UChar curBackward(void); - + void init(CharacterIterator* iter, EMode mode, int32_t option); void initBuffer(void); void clearBuffer(void); - + // Utilities used by Compose static void bubbleAppend(UnicodeString& target, UChar ch, @@ -705,11 +705,11 @@ private: uint16_t index); static UChar pairExplode(UnicodeString& target, uint16_t action); - + // Utilities used by Decompose static void fixCanonical(UnicodeString& result); // Reorders combining marks static uint8_t getClass(UChar ch); // Gets char's combining class - + // Other static utility methods static void doAppend(const UChar source[], uint16_t offset, @@ -722,7 +722,7 @@ private: uint16_t offset, UnicodeString& dest, UTextOffset pos); - + static void hangulToJamo(UChar ch, UnicodeString& result, uint16_t decompLimit); @@ -731,27 +731,27 @@ private: UnicodeString& dest); static void jamoToHangul(UnicodeString& buffer, UTextOffset start); - + //------------------------------------------------------------------------- // Private data //------------------------------------------------------------------------- - + EMode fMode; int32_t fOptions; int16_t minDecomp; - + // The input text and our position in it CharacterIterator* text; - + // A buffer for holding intermediate results UnicodeString buffer; UTextOffset bufferPos; UTextOffset bufferLimit; UChar currentChar; - + // Another buffer for use during iterative composition UnicodeString explodeBuf; - + enum { EMPTY = -1, STR_INDEX_SHIFT = 2, //Must agree with the constants used in NormalizerBuilder @@ -769,7 +769,7 @@ private: JAMO_TCOUNT = 28, JAMO_NCOUNT = JAMO_VCOUNT * JAMO_TCOUNT }; - + friend class ComposedCharIter; };