ICU-20680 revert use of UPRV_UNREACHABLE in places actually reached in production code

This commit is contained in:
Peter Edberg 2019-08-27 21:29:51 -07:00 committed by pedberg-icu
parent 4b6eb7236a
commit 141884a85c
2 changed files with 6 additions and 3 deletions

View file

@ -207,7 +207,8 @@ u_UCharsToChars(const UChar *us, char *cs, int32_t length) {
while(length>0) {
u=*us++;
if(!UCHAR_IS_INVARIANT(u)) {
UPRV_UNREACHABLE; /* Variant characters were used. These are not portable in ICU. */
U_ASSERT(FALSE); /* Variant characters were used. These are not portable in ICU. */
u=0;
}
*cs++=(char)UCHAR_TO_CHAR(u);
--length;

View file

@ -3544,7 +3544,8 @@ const CEI *CEIBuffer::get(int32_t index) {
// Verify that it is the next one in sequence, which is all
// that is allowed.
if (index != limitIx) {
UPRV_UNREACHABLE;
U_ASSERT(FALSE);
return NULL;
}
// Manage the circular CE buffer indexing
@ -3581,7 +3582,8 @@ const CEI *CEIBuffer::getPrevious(int32_t index) {
// Verify that it is the next one in sequence, which is all
// that is allowed.
if (index != limitIx) {
UPRV_UNREACHABLE;
U_ASSERT(FALSE);
return NULL;
}
// Manage the circular CE buffer indexing