summaryrefslogtreecommitdiff
path: root/thirdparty/icu4c/common/rbbi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/icu4c/common/rbbi.cpp')
-rw-r--r--thirdparty/icu4c/common/rbbi.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/thirdparty/icu4c/common/rbbi.cpp b/thirdparty/icu4c/common/rbbi.cpp
index b821ca4463..f65177f232 100644
--- a/thirdparty/icu4c/common/rbbi.cpp
+++ b/thirdparty/icu4c/common/rbbi.cpp
@@ -262,7 +262,7 @@ RuleBasedBreakIterator::operator=(const RuleBasedBreakIterator& that) {
fCharIter = &fSCharIter;
if (that.fCharIter != NULL && that.fCharIter != &that.fSCharIter) {
- // This is a little bit tricky - it will intially appear that
+ // This is a little bit tricky - it will initially appear that
// this->fCharIter is adopted, even if that->fCharIter was
// not adopted. That's ok.
fCharIter = that.fCharIter->clone();
@@ -366,16 +366,16 @@ RuleBasedBreakIterator::clone() const {
}
/**
- * Equality operator. Returns TRUE if both BreakIterators are of the
+ * Equality operator. Returns true if both BreakIterators are of the
* same class, have the same behavior, and iterate over the same text.
*/
-UBool
+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;
}
/**
@@ -671,7 +671,7 @@ int32_t RuleBasedBreakIterator::preceding(int32_t offset) {
}
/**
- * Returns true if the specfied position is a boundary position. As a side
+ * Returns true if the specified position is a boundary position. As a side
* effect, leaves the iterator pointing to the first boundary position at
* or after "offset".
*
@@ -1037,7 +1037,7 @@ int32_t RuleBasedBreakIterator::handleSafePrevious(int32_t fromPosition) {
if (state == STOP_STATE) {
// This is the normal exit from the lookup state machine.
- // Transistion to state zero means we have found a safe point.
+ // Transition to state zero means we have found a safe point.
break;
}
}
@@ -1260,6 +1260,7 @@ RuleBasedBreakIterator::getLanguageBreakEngine(UChar32 c) {
// first.
fLanguageBreakEngines->insertElementAt(fUnhandledBreakEngine, 0, status);
// If we can't insert it, or creation failed, get rid of it
+ U_ASSERT(!fLanguageBreakEngines->hasDeleter());
if (U_FAILURE(status)) {
delete fUnhandledBreakEngine;
fUnhandledBreakEngine = 0;