diff --git a/icu4c/source/common/rbbiscan.cpp b/icu4c/source/common/rbbiscan.cpp index 776b7d21edc..d18a4d25a49 100644 --- a/icu4c/source/common/rbbiscan.cpp +++ b/icu4c/source/common/rbbiscan.cpp @@ -787,7 +787,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) { // the middle (a variable name, for example.) for (;;) { c.fChar = nextCharLL(); - if (c.fChar == -1 || // EOF + if (c.fChar == (UChar32)-1 || // EOF c.fChar == chCR || c.fChar == chLF || c.fChar == chNEL || @@ -886,12 +886,12 @@ void RBBIRuleScanner::parse() { // Table row specified "escaped P" and the char is either 'p' or 'P'. break; } - if (tableEl->fCharClass == 252 && fC.fChar == -1) { + if (tableEl->fCharClass == 252 && fC.fChar == (UChar32)-1) { // Table row specified eof and we hit eof on the input. break; } - if (tableEl->fCharClass >= 128 && tableEl->fCharClass < 240 && fC.fChar != -1) { + if (tableEl->fCharClass >= 128 && tableEl->fCharClass < 240 && fC.fChar != (UChar32)-1) { UnicodeSet *uniset = fRuleSets[tableEl->fCharClass-128]; if (uniset->contains(fC.fChar)) { // Table row specified a character class, or set of characters, diff --git a/icu4c/source/common/unicode/usetiter.h b/icu4c/source/common/unicode/usetiter.h index ce7f07970b6..f9d58fc8af8 100644 --- a/icu4c/source/common/unicode/usetiter.h +++ b/icu4c/source/common/unicode/usetiter.h @@ -4,7 +4,7 @@ * Corporation and others. All Rights Reserved. ********************************************************************** * $Source: /xsrl/Nsvn/icu/icu/source/common/unicode/usetiter.h,v $ -* $Revision: 1.5 $ +* $Revision: 1.6 $ ********************************************************************** */ #ifndef USETITER_H @@ -236,7 +236,7 @@ private: }; inline UBool UnicodeSetIterator::isString() const { - return codepoint == IS_STRING; + return codepoint == (UChar32)IS_STRING; } inline UChar32 UnicodeSetIterator::getCodepoint() const { diff --git a/icu4c/source/common/usetiter.cpp b/icu4c/source/common/usetiter.cpp index 522e0ffe966..cc562f4dcc1 100644 --- a/icu4c/source/common/usetiter.cpp +++ b/icu4c/source/common/usetiter.cpp @@ -4,8 +4,8 @@ * Corporation and others. All Rights Reserved. ********************************************************************** * $Source: /xsrl/Nsvn/icu/icu/source/common/usetiter.cpp,v $ -* $Date: 2002/06/28 23:53:51 $ -* $Revision: 1.3 $ +* $Date: 2002/08/22 21:01:43 $ +* $Revision: 1.4 $ ********************************************************************** */ #include "unicode/usetiter.h" @@ -58,7 +58,7 @@ UBool UnicodeSetIterator::next() { } if (nextString >= stringCount) return FALSE; - codepoint = IS_STRING; // signal that value is actually a string + codepoint = (UChar32)IS_STRING; // signal that value is actually a string string = (const UnicodeString*) set->strings->elementAt(nextString++); return TRUE; } @@ -90,7 +90,7 @@ UBool UnicodeSetIterator::nextRange() { } if (nextString >= stringCount) return FALSE; - codepoint = IS_STRING; // signal that value is actually a string + codepoint = (UChar32)IS_STRING; // signal that value is actually a string string = (const UnicodeString*) set->strings->elementAt(nextString++); return TRUE; }