]> granicus.if.org Git - icu/commitdiff
ICU-20973 Use standard keywords true & false to initialize type bool.
authorFredrik Roubert <roubert@google.com>
Thu, 26 Aug 2021 13:15:30 +0000 (15:15 +0200)
committerFredrik Roubert <fredrik@roubert.name>
Thu, 26 Aug 2021 16:53:10 +0000 (18:53 +0200)
Now when all equality operators return standard bool (commit 633438f),
it no longer makes any sense to use the ICU4C constants TRUE & FALSE
or local variables of type UBool for their return value.

51 files changed:
icu4c/source/common/bytestriebuilder.cpp
icu4c/source/common/messagepattern.cpp
icu4c/source/common/rbbi.cpp
icu4c/source/common/rbbidata.cpp
icu4c/source/common/schriter.cpp
icu4c/source/common/stringtriebuilder.cpp
icu4c/source/common/ucharstriebuilder.cpp
icu4c/source/common/uchriter.cpp
icu4c/source/common/uniset.cpp
icu4c/source/common/ustr_titlecase_brkiter.cpp
icu4c/source/common/uvector.cpp
icu4c/source/common/uvectr32.cpp
icu4c/source/common/uvectr64.cpp
icu4c/source/i18n/alphaindex.cpp
icu4c/source/i18n/choicfmt.cpp
icu4c/source/i18n/coleitr.cpp
icu4c/source/i18n/collationiterator.cpp
icu4c/source/i18n/collationsettings.cpp
icu4c/source/i18n/dcfmtsym.cpp
icu4c/source/i18n/dtfmtsym.cpp
icu4c/source/i18n/dtitvfmt.cpp
icu4c/source/i18n/dtitvinf.cpp
icu4c/source/i18n/dtptngen.cpp
icu4c/source/i18n/fmtable.cpp
icu4c/source/i18n/fpositer.cpp
icu4c/source/i18n/measfmt.cpp
icu4c/source/i18n/measunit.cpp
icu4c/source/i18n/measure.cpp
icu4c/source/i18n/msgfmt.cpp
icu4c/source/i18n/nfrs.cpp
icu4c/source/i18n/plurfmt.cpp
icu4c/source/i18n/plurrule.cpp
icu4c/source/i18n/rbnf.cpp
icu4c/source/i18n/rbtz.cpp
icu4c/source/i18n/reldtfmt.cpp
icu4c/source/i18n/repattrn.cpp
icu4c/source/i18n/rulebasedcollator.cpp
icu4c/source/i18n/scriptset.cpp
icu4c/source/i18n/search.cpp
icu4c/source/i18n/selfmt.cpp
icu4c/source/i18n/smpdtfmt.cpp
icu4c/source/i18n/stsearch.cpp
icu4c/source/i18n/tzfmt.cpp
icu4c/source/i18n/tznames.cpp
icu4c/source/i18n/tznames_impl.cpp
icu4c/source/i18n/tzrule.cpp
icu4c/source/i18n/tztrans.cpp
icu4c/source/i18n/utf16collationiterator.cpp
icu4c/source/i18n/vtzone.cpp
icu4c/source/test/intltest/apicoll.cpp
icu4c/source/test/intltest/srchtest.cpp

index 75f91abafd9a725e7c6add27638dcfbbce67904e..82dad42ca5fb1c869b3889639bf779bcb745032d 100644 (file)
@@ -346,10 +346,10 @@ BytesTrieBuilder::BTLinearMatchNode::BTLinearMatchNode(const char *bytes, int32_
 bool
 BytesTrieBuilder::BTLinearMatchNode::operator==(const Node &other) const {
     if(this==&other) {
-        return TRUE;
+        return true;
     }
     if(!LinearMatchNode::operator==(other)) {
-        return FALSE;
+        return false;
     }
     const BTLinearMatchNode &o=(const BTLinearMatchNode &)other;
     return 0==uprv_memcmp(s, o.s, length);
index b2956cb66b2bbd0dc51a7616f91e267a8279aa72..66fd2f4c93b2954a8156170357c16c4cbe44f2a9 100644 (file)
@@ -312,7 +312,7 @@ MessagePattern::clear() {
 bool
 MessagePattern::operator==(const MessagePattern &other) const {
     if(this==&other) {
-        return TRUE;
+        return true;
     }
     return
         aposMode==other.aposMode &&
@@ -390,7 +390,7 @@ MessagePattern::getPluralOffset(int32_t pluralStart) const {
 bool
 MessagePattern::Part::operator==(const Part &other) const {
     if(this==&other) {
-        return TRUE;
+        return true;
     }
     return
         type==other.type &&
index cd19293362c5198b7c517fa48e9e2f66e043e869..905d2aa09d4de68ca5fc60eb4a24cda4144de4c7 100644 (file)
@@ -372,10 +372,10 @@ RuleBasedBreakIterator::clone() const {
 bool
 RuleBasedBreakIterator::operator==(const BreakIterator& that) const {
     if (typeid(*this) != typeid(that)) {
-        return FALSE;
+        return false;
     }
     if (this == &that) {
-        return TRUE;
+        return true;
     }
 
     // The base class BreakIterator carries no state that participates in equality,
@@ -388,21 +388,21 @@ RuleBasedBreakIterator::operator==(const BreakIterator& that) const {
         // The two break iterators are operating on different text,
         //   or have a different iteration position.
         //   Note that fText's position is always the same as the break iterator's position.
-        return FALSE;
+        return false;
     }
 
     if (!(fPosition == that2.fPosition &&
             fRuleStatusIndex == that2.fRuleStatusIndex &&
             fDone == that2.fDone)) {
-        return FALSE;
+        return false;
     }
 
     if (that2.fData == fData ||
         (fData != NULL && that2.fData != NULL && *that2.fData == *fData)) {
             // The two break iterators are using the same rules.
-            return TRUE;
+            return true;
         }
-    return FALSE;
+    return false;
 }
 
 /**
index 8c91e89701ccf24682b902da4773b8fb912f6b74..6338ed3ed857d3d24e43dfadab8638cc476e50dd 100644 (file)
@@ -172,15 +172,15 @@ RBBIDataWrapper::~RBBIDataWrapper() {
 //-----------------------------------------------------------------------------
 bool RBBIDataWrapper::operator ==(const RBBIDataWrapper &other) const {
     if (fHeader == other.fHeader) {
-        return TRUE;
+        return true;
     }
     if (fHeader->fLength != other.fHeader->fLength) {
-        return FALSE;
+        return false;
     }
     if (uprv_memcmp(fHeader, other.fHeader, fHeader->fLength) == 0) {
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 int32_t  RBBIDataWrapper::hashCode() {
index f781bd43f48ee6e228d016b968f4ee0372653f6b..83b3db4ab0a945de1242a366695ca4e384aab1b0 100644 (file)
@@ -82,7 +82,7 @@ StringCharacterIterator::operator=(const StringCharacterIterator& that) {
 bool
 StringCharacterIterator::operator==(const ForwardCharacterIterator& that) const {
     if (this == &that) {
-        return TRUE;
+        return true;
     }
 
     // do not call UCharCharacterIterator::operator==()
@@ -90,7 +90,7 @@ StringCharacterIterator::operator==(const ForwardCharacterIterator& that) const
     // while we compare UnicodeString objects
 
     if (typeid(*this) != typeid(that)) {
-        return FALSE;
+        return false;
     }
 
     StringCharacterIterator&    realThat = (StringCharacterIterator&)that;
index 978ef9dbcf2374ee17a80fd7028d560caf088f44..4d52a88af7499b6c4bb88bff4f10dfd5d348f72e 100644 (file)
@@ -399,10 +399,10 @@ StringTrieBuilder::Node::markRightEdgesFirst(int32_t edgeNumber) {
 bool
 StringTrieBuilder::FinalValueNode::operator==(const Node &other) const {
     if(this==&other) {
-        return TRUE;
+        return true;
     }
     if(!Node::operator==(other)) {
-        return FALSE;
+        return false;
     }
     const FinalValueNode &o=(const FinalValueNode &)other;
     return value==o.value;
@@ -416,10 +416,10 @@ StringTrieBuilder::FinalValueNode::write(StringTrieBuilder &builder) {
 bool
 StringTrieBuilder::ValueNode::operator==(const Node &other) const {
     if(this==&other) {
-        return TRUE;
+        return true;
     }
     if(!Node::operator==(other)) {
-        return FALSE;
+        return false;
     }
     const ValueNode &o=(const ValueNode &)other;
     return hasValue==o.hasValue && (!hasValue || value==o.value);
@@ -428,10 +428,10 @@ StringTrieBuilder::ValueNode::operator==(const Node &other) const {
 bool
 StringTrieBuilder::IntermediateValueNode::operator==(const Node &other) const {
     if(this==&other) {
-        return TRUE;
+        return true;
     }
     if(!ValueNode::operator==(other)) {
-        return FALSE;
+        return false;
     }
     const IntermediateValueNode &o=(const IntermediateValueNode &)other;
     return next==o.next;
@@ -454,10 +454,10 @@ StringTrieBuilder::IntermediateValueNode::write(StringTrieBuilder &builder) {
 bool
 StringTrieBuilder::LinearMatchNode::operator==(const Node &other) const {
     if(this==&other) {
-        return TRUE;
+        return true;
     }
     if(!ValueNode::operator==(other)) {
-        return FALSE;
+        return false;
     }
     const LinearMatchNode &o=(const LinearMatchNode &)other;
     return length==o.length && next==o.next;
@@ -474,18 +474,18 @@ StringTrieBuilder::LinearMatchNode::markRightEdgesFirst(int32_t edgeNumber) {
 bool
 StringTrieBuilder::ListBranchNode::operator==(const Node &other) const {
     if(this==&other) {
-        return TRUE;
+        return true;
     }
     if(!Node::operator==(other)) {
-        return FALSE;
+        return false;
     }
     const ListBranchNode &o=(const ListBranchNode &)other;
     for(int32_t i=0; i<length; ++i) {
         if(units[i]!=o.units[i] || values[i]!=o.values[i] || equal[i]!=o.equal[i]) {
-            return FALSE;
+            return false;
         }
     }
-    return TRUE;
+    return true;
 }
 
 int32_t
@@ -553,10 +553,10 @@ StringTrieBuilder::ListBranchNode::write(StringTrieBuilder &builder) {
 bool
 StringTrieBuilder::SplitBranchNode::operator==(const Node &other) const {
     if(this==&other) {
-        return TRUE;
+        return true;
     }
     if(!Node::operator==(other)) {
-        return FALSE;
+        return false;
     }
     const SplitBranchNode &o=(const SplitBranchNode &)other;
     return unit==o.unit && lessThan==o.lessThan && greaterOrEqual==o.greaterOrEqual;
@@ -587,10 +587,10 @@ StringTrieBuilder::SplitBranchNode::write(StringTrieBuilder &builder) {
 bool
 StringTrieBuilder::BranchHeadNode::operator==(const Node &other) const {
     if(this==&other) {
-        return TRUE;
+        return true;
     }
     if(!ValueNode::operator==(other)) {
-        return FALSE;
+        return false;
     }
     const BranchHeadNode &o=(const BranchHeadNode &)other;
     return length==o.length && next==o.next;
index 63f3d275098b9a04dd9849b366137bcae4ade859..3871df6c274a4b071c18951ce24eb54505862741 100644 (file)
@@ -293,10 +293,10 @@ UCharsTrieBuilder::UCTLinearMatchNode::UCTLinearMatchNode(const UChar *units, in
 bool
 UCharsTrieBuilder::UCTLinearMatchNode::operator==(const Node &other) const {
     if(this==&other) {
-        return TRUE;
+        return true;
     }
     if(!LinearMatchNode::operator==(other)) {
-        return FALSE;
+        return false;
     }
     const UCTLinearMatchNode &o=(const UCTLinearMatchNode &)other;
     return 0==u_memcmp(s, o.s, length);
index ce248fbca859d81f31492d5d9ac7bd5a2f9e7f3d..2967375a6a355a1b31e1575ee115d3f2c94344eb 100644 (file)
@@ -69,10 +69,10 @@ UCharCharacterIterator::~UCharCharacterIterator() {
 bool
 UCharCharacterIterator::operator==(const ForwardCharacterIterator& that) const {
     if (this == &that) {
-        return TRUE;
+        return true;
     }
     if (typeid(*this) != typeid(that)) {
-        return FALSE;
+        return false;
     }
 
     UCharCharacterIterator&    realThat = (UCharCharacterIterator&)that;
index 225f0609c1cdde632a1c75ab9a41e495ac319f83..12764c28c5c87520d4d533cddcafdbf895a03de6 100644 (file)
@@ -279,13 +279,13 @@ UnicodeSet *UnicodeSet::cloneAsThawed() const {
  * @return <tt>true</tt> if the specified set is equal to this set.
  */
 bool UnicodeSet::operator==(const UnicodeSet& o) const {
-    if (len != o.len) return FALSE;
+    if (len != o.len) return false;
     for (int32_t i = 0; i < len; ++i) {
-        if (list[i] != o.list[i]) return FALSE;
+        if (list[i] != o.list[i]) return false;
     }
-    if (hasStrings() != o.hasStrings()) { return FALSE; }
-    if (hasStrings() && *strings != *o.strings) return FALSE;
-    return TRUE;
+    if (hasStrings() != o.hasStrings()) { return false; }
+    if (hasStrings() && *strings != *o.strings) return false;
+    return true;
 }
 
 /**
index c0714591af7f15a43d846bae7aff2b1786d06f21..3648a0dc4643ebd5f6e9e7dc82fb94d60c09a8ef 100644 (file)
@@ -73,7 +73,7 @@ private:
 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(WholeStringBreakIterator)
 
 WholeStringBreakIterator::~WholeStringBreakIterator() {}
-bool WholeStringBreakIterator::operator==(const BreakIterator&) const { return FALSE; }
+bool WholeStringBreakIterator::operator==(const BreakIterator&) const { return false; }
 WholeStringBreakIterator *WholeStringBreakIterator::clone() const { return nullptr; }
 
 CharacterIterator &WholeStringBreakIterator::getText() const {
index b4cedaf0fc885b1e8b5c28eb61a157688042c0a2..5a7f33b64fe55502e669933d09cb8bcd87e3a135 100644 (file)
@@ -112,16 +112,16 @@ void UVector::assign(const UVector& other, UElementAssigner *assign, UErrorCode
 // This only does something sensible if this object has a non-null comparer
 bool UVector::operator==(const UVector& other) {
     int32_t i;
-    if (count != other.count) return FALSE;
+    if (count != other.count) return false;
     if (comparer != NULL) {
         // Compare using this object's comparer
         for (i=0; i<count; ++i) {
             if (!(*comparer)(elements[i], other.elements[i])) {
-                return FALSE;
+                return false;
             }
         }
     }
-    return TRUE;
+    return true;
 }
 
 void UVector::addElementX(void* obj, UErrorCode &status) {
index 1f886022902157b95de7b1574f9a6f24cf2a2ddc..a77ecb689fdaadbb3d621e48aebc76c5589552b3 100644 (file)
@@ -85,13 +85,13 @@ void UVector32::assign(const UVector32& other, UErrorCode &ec) {
 
 bool UVector32::operator==(const UVector32& other) {
     int32_t i;
-    if (count != other.count) return FALSE;
+    if (count != other.count) return false;
     for (i=0; i<count; ++i) {
         if (elements[i] != other.elements[i]) {
-            return FALSE;
+            return false;
         }
     }
-    return TRUE;
+    return true;
 }
 
 
index e418ea6b1d0777719a8582aa2e5306cdc03de399..57315c00ff56a8539b1afb4678f841fe7cd4ec3a 100644 (file)
@@ -82,13 +82,13 @@ void UVector64::assign(const UVector64& other, UErrorCode &ec) {
 
 bool UVector64::operator==(const UVector64& other) {
     int32_t i;
-    if (count != other.count) return FALSE;
+    if (count != other.count) return false;
     for (i=0; i<count; ++i) {
         if (elements[i] != other.elements[i]) {
-            return FALSE;
+            return false;
         }
     }
-    return TRUE;
+    return true;
 }
 
 
index 91b8a10783f1a126efc1ec56f2c371828f86b330..6be2cb6ced36f6d8b9581d5f63306d823555c057 100644 (file)
@@ -800,12 +800,12 @@ UnicodeString AlphabeticIndex::separated(const UnicodeString &item) {
 
 
 bool AlphabeticIndex::operator==(const AlphabeticIndex& /* other */) const {
-    return FALSE;
+    return false;
 }
 
 
 bool AlphabeticIndex::operator!=(const AlphabeticIndex& /* other */) const {
-    return FALSE;
+    return false;
 }
 
 
index 1bf00bde5dbef4e20a16a14e596f6f30b1c740d4..d06eec35fa2355de884897d43a28b34d10da74dc 100644 (file)
@@ -135,8 +135,8 @@ ChoiceFormat::ChoiceFormat(const UnicodeString& newPattern,
 bool
 ChoiceFormat::operator==(const Format& that) const
 {
-    if (this == &that) return TRUE;
-    if (!NumberFormat::operator==(that)) return FALSE;
+    if (this == &that) return true;
+    if (!NumberFormat::operator==(that)) return false;
     ChoiceFormat& thatAlias = (ChoiceFormat&)that;
     return msgPattern == thatAlias.msgPattern;
 }
index 165cd0fb02d5f34dd7fe4521675cd0d7681db8c0..9d4b1ad24f1ec5b05810b93dc308f308527a06fa 100644 (file)
@@ -147,7 +147,7 @@ bool CollationElementIterator::operator==(
                                     const CollationElementIterator& that) const
 {
     if (this == &that) {
-        return TRUE;
+        return true;
     }
 
     return
index 9041710b17ef254d77238d2a26a42f84ba569495..6bfdfbe7c70fa04e9c12ec858d39dc04a625dc47 100644 (file)
@@ -180,12 +180,12 @@ CollationIterator::operator==(const CollationIterator &other) const {
             cesIndex == other.cesIndex &&
             numCpFwd == other.numCpFwd &&
             isNumeric == other.isNumeric)) {
-        return FALSE;
+        return false;
     }
     for(int32_t i = 0; i < ceBuffer.length; ++i) {
-        if(ceBuffer.get(i) != other.ceBuffer.get(i)) { return FALSE; }
+        if(ceBuffer.get(i) != other.ceBuffer.get(i)) { return false; }
     }
-    return TRUE;
+    return true;
 }
 
 void
index 2d716fd5635972c161bc664296b675f43a1941ea..9eeab483310ad2d633252d8494a54e499d026ede 100644 (file)
@@ -50,13 +50,13 @@ CollationSettings::~CollationSettings() {
 
 bool
 CollationSettings::operator==(const CollationSettings &other) const {
-    if(options != other.options) { return FALSE; }
-    if((options & ALTERNATE_MASK) != 0 && variableTop != other.variableTop) { return FALSE; }
-    if(reorderCodesLength != other.reorderCodesLength) { return FALSE; }
+    if(options != other.options) { return false; }
+    if((options & ALTERNATE_MASK) != 0 && variableTop != other.variableTop) { return false; }
+    if(reorderCodesLength != other.reorderCodesLength) { return false; }
     for(int32_t i = 0; i < reorderCodesLength; ++i) {
-        if(reorderCodes[i] != other.reorderCodes[i]) { return FALSE; }
+        if(reorderCodes[i] != other.reorderCodes[i]) { return false; }
     }
-    return TRUE;
+    return true;
 }
 
 int32_t
index de8d8f64c0b55d2ec9387c7d894d7038f5acadd0..96be4388efe446d4112268d1014d66d224c5923a 100644 (file)
@@ -179,25 +179,25 @@ bool
 DecimalFormatSymbols::operator==(const DecimalFormatSymbols& that) const
 {
     if (this == &that) {
-        return TRUE;
+        return true;
     }
     if (fIsCustomCurrencySymbol != that.fIsCustomCurrencySymbol) { 
-        return FALSE; 
+        return false;
     } 
     if (fIsCustomIntlCurrencySymbol != that.fIsCustomIntlCurrencySymbol) { 
-        return FALSE; 
+        return false;
     } 
     for(int32_t i = 0; i < (int32_t)kFormatSymbolCount; ++i) {
         if(fSymbols[(ENumberFormatSymbol)i] != that.fSymbols[(ENumberFormatSymbol)i]) {
-            return FALSE;
+            return false;
         }
     }
     for(int32_t i = 0; i < (int32_t)UNUM_CURRENCY_SPACING_COUNT; ++i) {
         if(currencySpcBeforeSym[i] != that.currencySpcBeforeSym[i]) {
-            return FALSE;
+            return false;
         }
         if(currencySpcAfterSym[i] != that.currencySpcAfterSym[i]) {
-            return FALSE;
+            return false;
         }
     }
     // No need to check fCodePointZero since it is based on fSymbols
index 549fc303aa55d1e54d57e3b107e452030f7d5360..501c9a19535655daac1663194eb5fbaa245bffaa 100644 (file)
@@ -544,7 +544,7 @@ DateFormatSymbols::operator==(const DateFormatSymbols& other) const
 {
     // First do cheap comparisons
     if (this == &other) {
-        return TRUE;
+        return true;
     }
     if (fErasCount == other.fErasCount &&
         fEraNamesCount == other.fEraNamesCount &&
@@ -625,22 +625,22 @@ DateFormatSymbols::operator==(const DateFormatSymbols& other) const
             // Compare the contents of fZoneStrings
             if (fZoneStrings == NULL && other.fZoneStrings == NULL) {
                 if (fZSFLocale == other.fZSFLocale) {
-                    return TRUE;
+                    return true;
                 }
             } else if (fZoneStrings != NULL && other.fZoneStrings != NULL) {
                 if (fZoneStringsRowCount == other.fZoneStringsRowCount
                     && fZoneStringsColCount == other.fZoneStringsColCount) {
-                    UBool cmpres = TRUE;
+                    bool cmpres = true;
                     for (int32_t i = 0; (i < fZoneStringsRowCount) && cmpres; i++) {
                         cmpres = arrayCompare(fZoneStrings[i], other.fZoneStrings[i], fZoneStringsColCount);
                     }
                     return cmpres;
                 }
             }
-            return FALSE;
+            return false;
         }
     }
-    return FALSE;
+    return false;
 }
 
 //------------------------------------------------------
index f59b19d9aae9c814403d34ead6497a11be012866..298fb62be0cc224370e02c7bada231fe65c61cea 100644 (file)
@@ -231,35 +231,35 @@ DateIntervalFormat::clone() const {
 
 bool
 DateIntervalFormat::operator==(const Format& other) const {
-    if (typeid(*this) != typeid(other)) {return FALSE;}
+    if (typeid(*this) != typeid(other)) {return false;}
     const DateIntervalFormat* fmt = (DateIntervalFormat*)&other;
-    if (this == fmt) {return TRUE;}
-    if (!Format::operator==(other)) {return FALSE;}
-    if ((fInfo != fmt->fInfo) && (fInfo == nullptr || fmt->fInfo == nullptr)) {return FALSE;}
-    if (fInfo && fmt->fInfo && (*fInfo != *fmt->fInfo )) {return FALSE;}
+    if (this == fmt) {return true;}
+    if (!Format::operator==(other)) {return false;}
+    if ((fInfo != fmt->fInfo) && (fInfo == nullptr || fmt->fInfo == nullptr)) {return false;}
+    if (fInfo && fmt->fInfo && (*fInfo != *fmt->fInfo )) {return false;}
     {
         Mutex lock(&gFormatterMutex);
-        if (fDateFormat != fmt->fDateFormat && (fDateFormat == nullptr || fmt->fDateFormat == nullptr)) {return FALSE;}
-        if (fDateFormat && fmt->fDateFormat && (*fDateFormat != *fmt->fDateFormat)) {return FALSE;}
+        if (fDateFormat != fmt->fDateFormat && (fDateFormat == nullptr || fmt->fDateFormat == nullptr)) {return false;}
+        if (fDateFormat && fmt->fDateFormat && (*fDateFormat != *fmt->fDateFormat)) {return false;}
     }
     // note: fFromCalendar and fToCalendar hold no persistent state, and therefore do not participate in operator ==.
     //       fDateFormat has the primary calendar for the DateIntervalFormat.
-    if (fSkeleton != fmt->fSkeleton) {return FALSE;}
-    if (fDatePattern != fmt->fDatePattern && (fDatePattern == nullptr || fmt->fDatePattern == nullptr)) {return FALSE;}
-    if (fDatePattern && fmt->fDatePattern && (*fDatePattern != *fmt->fDatePattern)) {return FALSE;}
-    if (fTimePattern != fmt->fTimePattern && (fTimePattern == nullptr || fmt->fTimePattern == nullptr)) {return FALSE;}
-    if (fTimePattern && fmt->fTimePattern && (*fTimePattern != *fmt->fTimePattern)) {return FALSE;}
-    if (fDateTimeFormat != fmt->fDateTimeFormat && (fDateTimeFormat == nullptr || fmt->fDateTimeFormat == nullptr)) {return FALSE;}
-    if (fDateTimeFormat && fmt->fDateTimeFormat && (*fDateTimeFormat != *fmt->fDateTimeFormat)) {return FALSE;}
-    if (fLocale != fmt->fLocale) {return FALSE;}
+    if (fSkeleton != fmt->fSkeleton) {return false;}
+    if (fDatePattern != fmt->fDatePattern && (fDatePattern == nullptr || fmt->fDatePattern == nullptr)) {return false;}
+    if (fDatePattern && fmt->fDatePattern && (*fDatePattern != *fmt->fDatePattern)) {return false;}
+    if (fTimePattern != fmt->fTimePattern && (fTimePattern == nullptr || fmt->fTimePattern == nullptr)) {return false;}
+    if (fTimePattern && fmt->fTimePattern && (*fTimePattern != *fmt->fTimePattern)) {return false;}
+    if (fDateTimeFormat != fmt->fDateTimeFormat && (fDateTimeFormat == nullptr || fmt->fDateTimeFormat == nullptr)) {return false;}
+    if (fDateTimeFormat && fmt->fDateTimeFormat && (*fDateTimeFormat != *fmt->fDateTimeFormat)) {return false;}
+    if (fLocale != fmt->fLocale) {return false;}
 
     for (int32_t i = 0; i< DateIntervalInfo::kIPI_MAX_INDEX; ++i ) {
-        if (fIntervalPatterns[i].firstPart != fmt->fIntervalPatterns[i].firstPart) {return FALSE;}
-        if (fIntervalPatterns[i].secondPart != fmt->fIntervalPatterns[i].secondPart ) {return FALSE;}
-        if (fIntervalPatterns[i].laterDateFirst != fmt->fIntervalPatterns[i].laterDateFirst) {return FALSE;}
+        if (fIntervalPatterns[i].firstPart != fmt->fIntervalPatterns[i].firstPart) {return false;}
+        if (fIntervalPatterns[i].secondPart != fmt->fIntervalPatterns[i].secondPart ) {return false;}
+        if (fIntervalPatterns[i].laterDateFirst != fmt->fIntervalPatterns[i].laterDateFirst) {return false;}
     }
-    if (fCapitalizationContext != fmt->fCapitalizationContext) {return FALSE;}
-    return TRUE;
+    if (fCapitalizationContext != fmt->fCapitalizationContext) {return false;}
+    return true;
 }
 
 
index 7824da8cec13c50c7472e5588bc752b225136433..3a85658095ca7c014f66fb51cb3e3b90e2b2eb92 100644 (file)
@@ -167,11 +167,11 @@ DateIntervalInfo::~DateIntervalInfo() {
 
 bool
 DateIntervalInfo::operator==(const DateIntervalInfo& other) const {
-    UBool equal = (
+    bool equal = (
       fFallbackIntervalPattern == other.fFallbackIntervalPattern &&
       fFirstDateInPtnIsLaterDate == other.fFirstDateInPtnIsLaterDate );
 
-    if ( equal == TRUE ) {
+    if ( equal ) {
         equal = fIntervalPatterns->equals(*(other.fIntervalPatterns));
     }
 
index d0cc1eeb0886183519079a0a2d4fb839fd5173c2..4f40ea8877fe474e43691ad39d4c34ddc4715312 100644 (file)
@@ -427,24 +427,24 @@ DateTimePatternGenerator::operator=(const DateTimePatternGenerator& other) {
 bool
 DateTimePatternGenerator::operator==(const DateTimePatternGenerator& other) const {
     if (this == &other) {
-        return TRUE;
+        return true;
     }
     if ((pLocale==other.pLocale) && (patternMap->equals(*other.patternMap)) &&
         (dateTimeFormat==other.dateTimeFormat) && (decimal==other.decimal)) {
         for ( int32_t i=0 ; i<UDATPG_FIELD_COUNT; ++i ) {
             if (appendItemFormats[i] != other.appendItemFormats[i]) {
-                return FALSE;
+                return false;
             }
             for (int32_t j=0; j< UDATPG_WIDTH_COUNT; ++j ) {
                 if (fieldDisplayNames[i][j] != other.fieldDisplayNames[i][j]) {
-                    return FALSE;
+                    return false;
                 }
             }
         }
-        return TRUE;
+        return true;
     }
     else {
-        return FALSE;
+        return false;
     }
 }
 
index 44fb49609b3f6bd843838168a984064920ca1c2a..7a9a81ded5dcd7f96fdca13c211bad5671b4d5fb 100644 (file)
@@ -280,13 +280,13 @@ Formattable::operator==(const Formattable& that) const
 {
     int32_t i;
 
-    if (this == &that) return TRUE;
+    if (this == &that) return true;
 
-    // Returns FALSE if the data types are different.
-    if (fType != that.fType) return FALSE;
+    // Returns false if the data types are different.
+    if (fType != that.fType) return false;
 
     // Compares the actual data values.
-    UBool equal = TRUE;
+    bool equal = true;
     switch (fType) {
     case kDate:
         equal = (fValue.fDate == that.fValue.fDate);
@@ -303,20 +303,20 @@ Formattable::operator==(const Formattable& that) const
         break;
     case kArray:
         if (fValue.fArrayAndCount.fCount != that.fValue.fArrayAndCount.fCount) {
-            equal = FALSE;
+            equal = false;
             break;
         }
         // Checks each element for equality.
         for (i=0; i<fValue.fArrayAndCount.fCount; ++i) {
             if (fValue.fArrayAndCount.fArray[i] != that.fValue.fArrayAndCount.fArray[i]) {
-                equal = FALSE;
+                equal = false;
                 break;
             }
         }
         break;
     case kObject:
         if (fValue.fObject == NULL || that.fValue.fObject == NULL) {
-            equal = FALSE;
+            equal = false;
         } else {
             equal = objectEquals(fValue.fObject, that.fValue.fObject);
         }
index 2db774927fbd2782e68bb0b73b266aa796a563c0..096896d7b38449d92c6a46a0c2b585941975f66b 100644 (file)
@@ -47,15 +47,15 @@ FieldPositionIterator::FieldPositionIterator(const FieldPositionIterator &rhs)
 
 bool FieldPositionIterator::operator==(const FieldPositionIterator &rhs) const {
   if (&rhs == this) {
-    return TRUE;
+    return true;
   }
   if (pos != rhs.pos) {
-    return FALSE;
+    return false;
   }
   if (!data) {
     return rhs.data == NULL;
   }
-  return rhs.data ? data->operator==(*rhs.data) : FALSE;
+  return rhs.data ? data->operator==(*rhs.data) : false;
 }
 
 void FieldPositionIterator::setData(UVector32 *adopt, UErrorCode& status) {
index f2c2e2535e5b81aedbdacc56ca7a4250b4c25681..a9a56a3b58d9f8695f4063a0d98543695af8a4ff 100644 (file)
@@ -429,10 +429,10 @@ MeasureFormat::~MeasureFormat() {
 
 bool MeasureFormat::operator==(const Format &other) const {
     if (this == &other) { // Same object, equal
-        return TRUE;
+        return true;
     }
     if (!Format::operator==(other)) {
-        return FALSE;
+        return false;
     }
     const MeasureFormat &rhs = static_cast<const MeasureFormat &>(other);
 
@@ -441,7 +441,7 @@ bool MeasureFormat::operator==(const Format &other) const {
 
     // differing widths aren't equivalent
     if (fWidth != rhs.fWidth) {
-        return FALSE;
+        return false;
     }
     // Width the same check locales.
     // We don't need to check locales if both objects have same cache.
@@ -451,10 +451,10 @@ bool MeasureFormat::operator==(const Format &other) const {
         const char *rhsLocaleId = rhs.getLocaleID(status);
         if (U_FAILURE(status)) {
             // On failure, assume not equal
-            return FALSE;
+            return false;
         }
         if (uprv_strcmp(localeId, rhsLocaleId) != 0) {
-            return FALSE;
+            return false;
         }
     }
     // Locales same, check NumberFormat if shared data differs.
index 856f00bb1b484de79e915f065157730abd736b1b..600904afaf5938e7cc9f1e575418143ee4635cd9 100644 (file)
@@ -2198,10 +2198,10 @@ const char *MeasureUnit::getIdentifier() const {
 
 bool MeasureUnit::operator==(const UObject& other) const {
     if (this == &other) {  // Same object, equal
-        return TRUE;
+        return true;
     }
     if (typeid(*this) != typeid(other)) { // Different types, not equal
-        return FALSE;
+        return false;
     }
     const MeasureUnit &rhs = static_cast<const MeasureUnit&>(other);
     return uprv_strcmp(getIdentifier(), rhs.getIdentifier()) == 0;
index f41a776f13dde39b6835bc7f5e5f13ce5638f9c8..b9c47fd401596d13fb36629eb617f20cee58bc1b 100644 (file)
@@ -62,10 +62,10 @@ Measure::~Measure() {
 
 bool Measure::operator==(const UObject& other) const {
     if (this == &other) {  // Same object, equal
-        return TRUE;
+        return true;
     }
     if (typeid(*this) != typeid(other)) { // Different types, not equal
-        return FALSE;
+        return false;
     }
     const Measure &m = static_cast<const Measure&>(other);
     return number == m.number &&
index 87f531e8e8837d680f6522f08a4a7650f60b00cf..b8cb2e2ca560fe881949761154c7e5ef405b66ac 100644 (file)
@@ -392,7 +392,7 @@ MessageFormat::operator=(const MessageFormat& that)
 bool
 MessageFormat::operator==(const Format& rhs) const
 {
-    if (this == &rhs) return TRUE;
+    if (this == &rhs) return true;
 
     MessageFormat& that = (MessageFormat&)rhs;
 
@@ -400,37 +400,37 @@ MessageFormat::operator==(const Format& rhs) const
     if (!Format::operator==(rhs) ||
         msgPattern != that.msgPattern ||
         fLocale != that.fLocale) {
-        return FALSE;
+        return false;
     }
 
     // Compare hashtables.
     if ((customFormatArgStarts == NULL) != (that.customFormatArgStarts == NULL)) {
-        return FALSE;
+        return false;
     }
     if (customFormatArgStarts == NULL) {
-        return TRUE;
+        return true;
     }
 
     UErrorCode ec = U_ZERO_ERROR;
     const int32_t count = uhash_count(customFormatArgStarts);
     const int32_t rhs_count = uhash_count(that.customFormatArgStarts);
     if (count != rhs_count) {
-        return FALSE;
+        return false;
     }
     int32_t idx = 0, rhs_idx = 0, pos = UHASH_FIRST, rhs_pos = UHASH_FIRST;
     for (; idx < count && rhs_idx < rhs_count && U_SUCCESS(ec); ++idx, ++rhs_idx) {
         const UHashElement* cur = uhash_nextElement(customFormatArgStarts, &pos);
         const UHashElement* rhs_cur = uhash_nextElement(that.customFormatArgStarts, &rhs_pos);
         if (cur->key.integer != rhs_cur->key.integer) {
-            return FALSE;
+            return false;
         }
         const Format* format = (const Format*)uhash_iget(cachedFormatters, cur->key.integer);
         const Format* rhs_format = (const Format*)uhash_iget(that.cachedFormatters, rhs_cur->key.integer);
         if (*format != *rhs_format) {
-            return FALSE;
+            return false;
         }
     }
-    return TRUE;
+    return true;
 }
 
 // -------------------------------------
@@ -1870,7 +1870,7 @@ UBool MessageFormat::equalFormats(const void* left, const void* right) {
 
 
 bool MessageFormat::DummyFormat::operator==(const Format&) const {
-    return TRUE;
+    return true;
 }
 
 MessageFormat::DummyFormat* MessageFormat::DummyFormat::clone() const {
index 6b49a78c404dcb5e0c7c8dabd99ce7a01ca94848..df04e33e04ff12a3b131679f61529f0b843d5c05 100644 (file)
@@ -354,19 +354,19 @@ NFRuleSet::operator==(const NFRuleSet& rhs) const
         // ...then compare the non-numerical rule lists...
         for (int i = 0; i < NON_NUMERICAL_RULE_LENGTH; i++) {
             if (!util_equalRules(nonNumericalRules[i], rhs.nonNumericalRules[i])) {
-                return FALSE;
+                return false;
             }
         }
 
         // ...then compare the rule lists...
         for (uint32_t i = 0; i < rules.size(); ++i) {
             if (*rules[i] != *rhs.rules[i]) {
-                return FALSE;
+                return false;
             }
         }
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 void
index b47e928831891568bde7287f14456b92335e71f1..65e275eeeb7536fff4469dd18b2597d268e1f722 100644 (file)
@@ -384,10 +384,10 @@ PluralFormat::operator=(const PluralFormat& other) {
 bool
 PluralFormat::operator==(const Format& other) const {
     if (this == &other) {
-        return TRUE;
+        return true;
     }
     if (!Format::operator==(other)) {
-        return FALSE;
+        return false;
     }
     const PluralFormat& o = (const PluralFormat&)other;
     return
index dbecc96beffe2c42ca27d273ea705894252f6ddb..267d4c6a99948e6042367aca7ecb2ae90e40c404 100644 (file)
@@ -561,34 +561,34 @@ PluralRules::operator==(const PluralRules& other) const  {
     UErrorCode status= U_ZERO_ERROR;
 
     if ( this == &other ) {
-        return TRUE;
+        return true;
     }
     LocalPointer<StringEnumeration> myKeywordList(getKeywords(status));
     LocalPointer<StringEnumeration> otherKeywordList(other.getKeywords(status));
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
 
     if (myKeywordList->count(status)!=otherKeywordList->count(status)) {
-        return FALSE;
+        return false;
     }
     myKeywordList->reset(status);
     while ((ptrKeyword=myKeywordList->snext(status))!=nullptr) {
         if (!other.isKeyword(*ptrKeyword)) {
-            return FALSE;
+            return false;
         }
     }
     otherKeywordList->reset(status);
     while ((ptrKeyword=otherKeywordList->snext(status))!=nullptr) {
         if (!this->isKeyword(*ptrKeyword)) {
-            return FALSE;
+            return false;
         }
     }
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
 
-    return TRUE;
+    return true;
 }
 
 
index c490b9421d733a6e054d647833b31de7c941bc40..4d5ca403f20a9411ff964c9c9bdead4427910c6f 100644 (file)
@@ -135,14 +135,14 @@ bool
 LocalizationInfo::operator==(const LocalizationInfo* rhs) const {
     if (rhs) {
         if (this == rhs) {
-            return TRUE;
+            return true;
         }
         
         int32_t rsc = getNumberOfRuleSets();
         if (rsc == rhs->getNumberOfRuleSets()) {
             for (int i = 0; i < rsc; ++i) {
                 if (!streq(getRuleSetName(i), rhs->getRuleSetName(i))) {
-                    return FALSE;
+                    return false;
                 }
             }
             int32_t dlc = getNumberOfDisplayLocales();
@@ -152,19 +152,19 @@ LocalizationInfo::operator==(const LocalizationInfo* rhs) const {
                     int32_t ix = rhs->indexForLocale(locale);
                     // if no locale, ix is -1, getLocaleName returns null, so streq returns false
                     if (!streq(locale, rhs->getLocaleName(ix))) {
-                        return FALSE;
+                        return false;
                     }
                     for (int j = 0; j < rsc; ++j) {
                         if (!streq(getDisplayName(i, j), rhs->getDisplayName(ix, j))) {
-                            return FALSE;
+                            return false;
                         }
                     }
                 }
-                return TRUE;
+                return true;
             }
         }
     }
-    return FALSE;
+    return false;
 }
 
 int32_t
@@ -940,7 +940,7 @@ bool
 RuleBasedNumberFormat::operator==(const Format& other) const
 {
     if (this == &other) {
-        return TRUE;
+        return true;
     }
 
     if (typeid(*this) == typeid(other)) {
@@ -953,7 +953,7 @@ RuleBasedNumberFormat::operator==(const Format& other) const
             (localizations == NULL 
                 ? rhs.localizations == NULL 
                 : (rhs.localizations == NULL 
-                    ? FALSE
+                    ? false
                     : *localizations == rhs.localizations))) {
 
             NFRuleSet** p = fRuleSets;
@@ -961,7 +961,7 @@ RuleBasedNumberFormat::operator==(const Format& other) const
             if (p == NULL) {
                 return q == NULL;
             } else if (q == NULL) {
-                return FALSE;
+                return false;
             }
             while (*p && *q && (**p == **q)) {
                 ++p;
@@ -971,7 +971,7 @@ RuleBasedNumberFormat::operator==(const Format& other) const
         }
     }
 
-    return FALSE;
+    return false;
 }
 
 UnicodeString
index 21870eeda2a531da846d83220a231d99816377ed..0a9c7db6581c7edc5f0caca77b0769f93acc1dfd 100644 (file)
@@ -91,21 +91,20 @@ RuleBasedTimeZone::operator=(const RuleBasedTimeZone& right) {
 bool
 RuleBasedTimeZone::operator==(const TimeZone& that) const {
     if (this == &that) {
-        return TRUE;
+        return true;
     }
-    if (typeid(*this) != typeid(that)
-        || BasicTimeZone::operator==(that) == FALSE) {
-        return FALSE;
+    if (typeid(*this) != typeid(that) || !BasicTimeZone::operator==(that)) {
+        return false;
     }
     RuleBasedTimeZone *rbtz = (RuleBasedTimeZone*)&that;
     if (*fInitialRule != *(rbtz->fInitialRule)) {
-        return FALSE;
+        return false;
     }
     if (compareRules(fHistoricRules, rbtz->fHistoricRules)
         && compareRules(fFinalRules, rbtz->fFinalRules)) {
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 bool
index 487eda26265e7800e8b7573c958c4a5bb37f6707..c8d68b686541674917c3f8e755b7ce966235dbde 100644 (file)
@@ -146,7 +146,7 @@ bool RelativeDateFormat::operator==(const Format& other) const {
                 fTimePattern==that->fTimePattern   &&
                 fLocale==that->fLocale );
     }
-    return FALSE;
+    return false;
 }
 
 static const UChar APOSTROPHE = (UChar)0x0027;
index ad1685594c28d38a3a5ef4ef08ce72309b01563e..33a9fe6e5d93a23178baf8a5a197d7a2fb3b634f 100644 (file)
@@ -297,7 +297,7 @@ bool    RegexPattern::operator ==(const RegexPattern &other) const {
             return *(this->fPatternString) == *(other.fPatternString);
         } else if (this->fPattern == NULL) {
             if (other.fPattern == NULL) {
-                return TRUE;
+                return true;
             }
         } else if (other.fPattern != NULL) {
             UTEXT_SETNATIVEINDEX(this->fPattern, 0);
@@ -305,7 +305,7 @@ bool    RegexPattern::operator ==(const RegexPattern &other) const {
             return utext_equals(this->fPattern, other.fPattern);
         }
     }
-    return FALSE;
+    return false;
 }
 
 //---------------------------------------------------------------------
index 5f7c4903f4582f507e5024c4fde33baa4c8c8e2d..d898cd52b32f18557295c4818e5e86589bddadb8 100644 (file)
@@ -241,19 +241,19 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(RuleBasedCollator)
 
 bool
 RuleBasedCollator::operator==(const Collator& other) const {
-    if(this == &other) { return TRUE; }
-    if(!Collator::operator==(other)) { return FALSE; }
+    if(this == &other) { return true; }
+    if(!Collator::operator==(other)) { return false; }
     const RuleBasedCollator &o = static_cast<const RuleBasedCollator &>(other);
-    if(*settings != *o.settings) { return FALSE; }
-    if(data == o.data) { return TRUE; }
+    if(*settings != *o.settings) { return false; }
+    if(data == o.data) { return true; }
     UBool thisIsRoot = data->base == NULL;
     UBool otherIsRoot = o.data->base == NULL;
     U_ASSERT(!thisIsRoot || !otherIsRoot);  // otherwise their data pointers should be ==
-    if(thisIsRoot != otherIsRoot) { return FALSE; }
+    if(thisIsRoot != otherIsRoot) { return false; }
     if((thisIsRoot || !tailoring->rules.isEmpty()) &&
             (otherIsRoot || !o.tailoring->rules.isEmpty())) {
         // Shortcut: If both collators have valid rule strings, then compare those.
-        if(tailoring->rules == o.tailoring->rules) { return TRUE; }
+        if(tailoring->rules == o.tailoring->rules) { return true; }
     }
     // Different rule strings can result in the same or equivalent tailoring.
     // The rule strings are optional in ICU resource bundles, although included by default.
@@ -261,14 +261,14 @@ RuleBasedCollator::operator==(const Collator& other) const {
     UErrorCode errorCode = U_ZERO_ERROR;
     LocalPointer<UnicodeSet> thisTailored(getTailoredSet(errorCode));
     LocalPointer<UnicodeSet> otherTailored(o.getTailoredSet(errorCode));
-    if(U_FAILURE(errorCode)) { return FALSE; }
-    if(*thisTailored != *otherTailored) { return FALSE; }
+    if(U_FAILURE(errorCode)) { return false; }
+    if(*thisTailored != *otherTailored) { return false; }
     // For completeness, we should compare all of the mappings;
     // or we should create a list of strings, sort it with one collator,
     // and check if both collators compare adjacent strings the same
     // (order & strength, down to quaternary); or similar.
     // Testing equality of collators seems unusual.
-    return TRUE;
+    return true;
 }
 
 int32_t
index abd95dd677473ef70a38badd121bd75adafe85ca..6a1db8c01c35623dfaa9f595927ff0c5d3606e28 100644 (file)
@@ -47,10 +47,10 @@ ScriptSet & ScriptSet::operator =(const ScriptSet &other) {
 bool ScriptSet::operator == (const ScriptSet &other) const {
     for (uint32_t i=0; i<UPRV_LENGTHOF(bits); i++) {
         if (bits[i] != other.bits[i]) {
-            return FALSE;
+            return false;
         }
     }
-    return TRUE;
+    return true;
 }
 
 UBool ScriptSet::test(UScriptCode script, UErrorCode &status) const {
index 5d9804fed3167b6be6ffd87deb32735f03d1b2cb..9e559bcc71fa86a309ebcf9351ea055aba0aeb51 100644 (file)
@@ -181,7 +181,7 @@ const UnicodeString & SearchIterator::getText(void) const
 bool SearchIterator::operator==(const SearchIterator &that) const
 {
     if (this == &that) {
-        return TRUE;
+        return true;
     }
     return (m_breakiterator_            == that.m_breakiterator_ &&
             m_search_->isCanonicalMatch == that.m_search_->isCanonicalMatch &&
index 8f89b62bf20f357a1618f4718e6b7cf442650dc5..bb18e84ef65736b7282045d3caa973354d474921 100644 (file)
@@ -167,10 +167,10 @@ SelectFormat::operator=(const SelectFormat& other) {
 bool
 SelectFormat::operator==(const Format& other) const {
     if (this == &other) {
-        return TRUE;
+        return true;
     }
     if (!Format::operator==(other)) {
-        return FALSE;
+        return false;
     }
     const SelectFormat& o = (const SelectFormat&)other;
     return msgPattern == o.msgPattern;
index d77136862885f2c6429a32b0e5eb3182d1b5b2e8..a42b386af8f2470d9008e4f690f5aa2a5f3369e3 100644 (file)
@@ -673,7 +673,7 @@ SimpleDateFormat::operator==(const Format& other) const
                 fHaveDefaultCentury  == that->fHaveDefaultCentury &&
                 fDefaultCenturyStart == that->fDefaultCenturyStart);
     }
-    return FALSE;
+    return false;
 }
 
 //----------------------------------------------------------------------
index 895affddd0877dad4e671054e779f32ddef1befc..1bade8fbd1108b033924b4ac93148ad97fb23d0e 100644 (file)
@@ -208,14 +208,14 @@ StringSearch & StringSearch::operator=(const StringSearch &that)
 bool StringSearch::operator==(const SearchIterator &that) const
 {
     if (this == &that) {
-        return TRUE;
+        return true;
     }
     if (SearchIterator::operator ==(that)) {
         StringSearch &thatsrch = (StringSearch &)that;
         return (this->m_pattern_ == thatsrch.m_pattern_ &&
                 this->m_strsrch_->collator == thatsrch.m_strsrch_->collator);
     }
-    return FALSE;
+    return false;
 }
 
 // public get and set methods ----------------------------------------
index 8ce5f7a32dc8c402fe55a82c2e0c71d50f79b6c1..302ad8e4aa639ae23084f00bb3d4afaddfa4cbc7 100644 (file)
@@ -486,7 +486,7 @@ bool
 TimeZoneFormat::operator==(const Format& other) const {
     TimeZoneFormat* tzfmt = (TimeZoneFormat*)&other;
 
-    UBool isEqual =
+    bool isEqual =
             fLocale == tzfmt->fLocale
             && fGMTPattern == tzfmt->fGMTPattern
             && fGMTZeroFormat == tzfmt->fGMTZeroFormat
index 50cff9d396fee37d6534e81bb14673e6686c03d5..796ba73de0099df27bddfa0e1c296da12061fdf0 100644 (file)
@@ -222,7 +222,7 @@ TimeZoneNamesDelegate::~TimeZoneNamesDelegate() {
 bool
 TimeZoneNamesDelegate::operator==(const TimeZoneNames& other) const {
     if (this == &other) {
-        return TRUE;
+        return true;
     }
     // Just compare if the other object also use the same
     // cache entry
@@ -230,7 +230,7 @@ TimeZoneNamesDelegate::operator==(const TimeZoneNames& other) const {
     if (rhs) {
         return fTZnamesCacheEntry == rhs->fTZnamesCacheEntry;
     }
-    return FALSE;
+    return false;
 }
 
 TimeZoneNamesDelegate*
index 96e959c81ee5bbf258c314349f56526d775d6906..d6bb25d0ea05e1826bc9ff971cbc245517f87d14 100644 (file)
@@ -1107,10 +1107,10 @@ TimeZoneNamesImpl::cleanup() {
 bool
 TimeZoneNamesImpl::operator==(const TimeZoneNames& other) const {
     if (this == &other) {
-        return TRUE;
+        return true;
     }
     // No implementation for now
-    return FALSE;
+    return false;
 }
 
 TimeZoneNamesImpl*
@@ -2159,10 +2159,10 @@ TZDBTimeZoneNames::~TZDBTimeZoneNames() {
 bool
 TZDBTimeZoneNames::operator==(const TimeZoneNames& other) const {
     if (this == &other) {
-        return TRUE;
+        return true;
     }
     // No implementation for now
-    return FALSE;
+    return false;
 }
 
 TZDBTimeZoneNames*
index 0303cfcf110473d3f7fd73ba11175ebd4f06bb54..a60fffbe020295da53b62391bddaaace609c9db4 100644 (file)
@@ -229,10 +229,10 @@ AnnualTimeZoneRule::operator=(const AnnualTimeZoneRule& right) {
 bool
 AnnualTimeZoneRule::operator==(const TimeZoneRule& that) const {
     if (this == &that) {
-        return TRUE;
+        return true;
     }
     if (typeid(*this) != typeid(that)) {
-        return FALSE;
+        return false;
     }
     AnnualTimeZoneRule *atzr = (AnnualTimeZoneRule*)&that;
     return (*fDateTimeRule == *(atzr->fDateTimeRule) &&
@@ -448,21 +448,21 @@ TimeArrayTimeZoneRule::operator=(const TimeArrayTimeZoneRule& right) {
 bool
 TimeArrayTimeZoneRule::operator==(const TimeZoneRule& that) const {
     if (this == &that) {
-        return TRUE;
+        return true;
     }
-    if (typeid(*this) != typeid(that) || TimeZoneRule::operator==(that) == FALSE) {
-        return FALSE;
+    if (typeid(*this) != typeid(that) || !TimeZoneRule::operator==(that)) {
+        return false;
     }
     TimeArrayTimeZoneRule *tatzr = (TimeArrayTimeZoneRule*)&that;
     if (fTimeRuleType != tatzr->fTimeRuleType ||
         fNumStartTimes != tatzr->fNumStartTimes) {
-        return FALSE;
+        return false;
     }
     // Compare start times
-    UBool res = TRUE;
+    bool res = true;
     for (int32_t i = 0; i < fNumStartTimes; i++) {
         if (fStartTimes[i] != tatzr->fStartTimes[i]) {
-            res = FALSE;
+            res = false;
             break;
         }
     }
index 8230ed20963021c0d1fe7299d8cd3b95094ae0ff..900e4be5408e1b7cc266448c17b4a52343445f30 100644 (file)
@@ -66,22 +66,22 @@ TimeZoneTransition::operator=(const TimeZoneTransition& right) {
 bool
 TimeZoneTransition::operator==(const TimeZoneTransition& that) const {
     if (this == &that) {
-        return TRUE;
+        return true;
     }
     if (typeid(*this) != typeid(that)) {
-        return FALSE;
+        return false;
     }
     if (fTime != that.fTime) {
-        return FALSE;
+        return false;
     }
     if ((fFrom == NULL && that.fFrom == NULL)
         || (fFrom != NULL && that.fFrom != NULL && *fFrom == *(that.fFrom))) {
         if ((fTo == NULL && that.fTo == NULL)
             || (fTo != NULL && that.fTo != NULL && *fTo == *(that.fTo))) {
-            return TRUE;
+            return true;
         }
     }
-    return FALSE;
+    return false;
 }
 
 bool
index daa575c5f3d62a5f0331be773081e9ba548c46ba..f1bdfabe738b0f1c2c50368c782ab6df23d8b401 100644 (file)
@@ -39,7 +39,7 @@ UTF16CollationIterator::~UTF16CollationIterator() {}
 
 bool
 UTF16CollationIterator::operator==(const CollationIterator &other) const {
-    if(!CollationIterator::operator==(other)) { return FALSE; }
+    if(!CollationIterator::operator==(other)) { return false; }
     const UTF16CollationIterator &o = static_cast<const UTF16CollationIterator &>(other);
     // Compare the iterator state but not the text: Assume that the caller does that.
     return (pos - start) == (o.pos - o.start);
@@ -174,11 +174,11 @@ FCDUTF16CollationIterator::~FCDUTF16CollationIterator() {}
 bool
 FCDUTF16CollationIterator::operator==(const CollationIterator &other) const {
     // Skip the UTF16CollationIterator and call its parent.
-    if(!CollationIterator::operator==(other)) { return FALSE; }
+    if(!CollationIterator::operator==(other)) { return false; }
     const FCDUTF16CollationIterator &o = static_cast<const FCDUTF16CollationIterator &>(other);
     // Compare the iterator state but not the text: Assume that the caller does that.
-    if(checkDir != o.checkDir) { return FALSE; }
-    if(checkDir == 0 && (start == segmentStart) != (o.start == o.segmentStart)) { return FALSE; }
+    if(checkDir != o.checkDir) { return false; }
+    if(checkDir == 0 && (start == segmentStart) != (o.start == o.segmentStart)) { return false; }
     if(checkDir != 0 || start == segmentStart) {
         return (pos - rawStart) == (o.pos - o.rawStart);
     } else {
index eab7de51426e191f0fbae739a933e29682b2bf49..35d233968c7a4b164a5746a325ca3d99df22cf89 100644 (file)
@@ -1050,10 +1050,10 @@ VTimeZone::operator=(const VTimeZone& right) {
 bool
 VTimeZone::operator==(const TimeZone& that) const {
     if (this == &that) {
-        return TRUE;
+        return true;
     }
     if (typeid(*this) != typeid(that) || !BasicTimeZone::operator==(that)) {
-        return FALSE;
+        return false;
     }
     VTimeZone *vtz = (VTimeZone*)&that;
     if (*tz == *(vtz->tz)
@@ -1061,9 +1061,9 @@ VTimeZone::operator==(const TimeZone& that) const {
         && lastmod == vtz->lastmod
         /* && olsonzid = that.olsonzid */
         /* && icutzver = that.icutzver */) {
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 bool
index db75bf88651a4965f136b7dcaae8480de718ea79..4a222d9c3ecb9a06891bb301228272b55b6c1b95 100644 (file)
@@ -2058,8 +2058,8 @@ inline bool TestCollator::operator==(const Collator& other) const {
     return this == &other;
 
     // Normally, subclasses should do something like the following:
-    //    if (this == &other) { return TRUE; }
-    //    if (!Collator::operator==(other)) { return FALSE; }  // not the same class
+    //    if (this == &other) { return true; }
+    //    if (!Collator::operator==(other)) { return false; }  // not the same class
     //
     //    const TestCollator &o = (const TestCollator&)other;
     //    (compare this vs. o's subclass fields)
index b203f89d71dfe45997ad1c1218126cd47b533ed8..b8603c179c6bf532793bc04e2392c06e8b331882 100644 (file)
@@ -2350,7 +2350,7 @@ SearchIterator * TestSearch::safeClone() const
 bool TestSearch::operator!=(const TestSearch &that) const
 {
     if (SearchIterator::operator !=(that)) {
-        return FALSE;
+        return false;
     }
     return m_offset_ != that.m_offset_ || m_pattern_ != that.m_pattern_;
 }