X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/0f5d89e82340278ed3d7d50029f37cab2c41a57e..c5116b9f5a666b9d59f443b3770acd6ef64dc6c3:/icuSources/i18n/transreg.cpp diff --git a/icuSources/i18n/transreg.cpp b/icuSources/i18n/transreg.cpp index 6bd32b00..5cc29625 100644 --- a/icuSources/i18n/transreg.cpp +++ b/icuSources/i18n/transreg.cpp @@ -192,8 +192,7 @@ Transliterator* TransliteratorAlias::create(UParseError& pe, } break; case RULES: - U_ASSERT(FALSE); // don't call create() if isRuleBased() returns TRUE! - break; + UPRV_UNREACHABLE; // don't call create() if isRuleBased() returns TRUE! } return t; } @@ -1336,12 +1335,12 @@ Transliterator* TransliteratorRegistry::instantiateEntry(const UnicodeString& ID int32_t passNumber = 1; for (int32_t i = 0; U_SUCCESS(status) && i < entry->u.dataVector->size(); i++) { // TODO: Should passNumber be turned into a decimal-string representation (1 -> "1")? - Transliterator* t = new RuleBasedTransliterator(UnicodeString(CompoundTransliterator::PASS_STRING) + UnicodeString(passNumber++), + Transliterator* tl = new RuleBasedTransliterator(UnicodeString(CompoundTransliterator::PASS_STRING) + UnicodeString(passNumber++), (TransliterationRuleData*)(entry->u.dataVector->elementAt(i)), FALSE); - if (t == 0) + if (tl == 0) status = U_MEMORY_ALLOCATION_ERROR; else - rbts->addElement(t, status); + rbts->addElement(tl, status); } if (U_FAILURE(status)) { delete rbts; @@ -1402,8 +1401,7 @@ Transliterator* TransliteratorRegistry::instantiateEntry(const UnicodeString& ID } return 0; default: - U_ASSERT(FALSE); // can't get here - return 0; + UPRV_UNREACHABLE; // can't get here } } U_NAMESPACE_END