]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/ustr_titlecase_brkiter.cpp
ICU-64232.0.1.tar.gz
[apple/icu.git] / icuSources / common / ustr_titlecase_brkiter.cpp
index 89888cf336b0e9ca19af5136c66c51e4a42880e5..056b40eb4175f6a578a9ce0e58405b3005886376 100644 (file)
@@ -77,13 +77,7 @@ UBool WholeStringBreakIterator::operator==(const BreakIterator&) const { return
 BreakIterator *WholeStringBreakIterator::clone() const { return nullptr; }
 
 CharacterIterator &WholeStringBreakIterator::getText() const {
-    U_ASSERT(FALSE);  // really should not be called
-    // Returns a null reference.
-    // Otherwise we would have to define a dummy CharacterIterator,
-    // and either have it as a field and const_cast it to a non-const reference,
-    // or have it via a pointer and return a reference to that.
-    CharacterIterator *none = nullptr;
-    return *none;
+    UPRV_UNREACHABLE;  // really should not be called
 }
 UText *WholeStringBreakIterator::getUText(UText * /*fillIn*/, UErrorCode &errorCode) const {
     if (U_SUCCESS(errorCode)) {
@@ -105,10 +99,8 @@ void  WholeStringBreakIterator::setText(UText *text, UErrorCode &errorCode) {
         }
     }
 }
-void  WholeStringBreakIterator::adoptText(CharacterIterator* it) {
-    U_ASSERT(FALSE);  // should not be called
-    length = it->getLength();
-    delete it;
+void  WholeStringBreakIterator::adoptText(CharacterIterator*) {
+    UPRV_UNREACHABLE;  // should not be called
 }
 
 int32_t WholeStringBreakIterator::first() { return 0; }