return TRUE;
}
}
- U_ASSERT(FALSE);
- fPositionInCache = -1;
- return FALSE;
+ UPRV_UNREACHABLE;
}
return TRUE;
}
}
- U_ASSERT(FALSE);
- fPositionInCache = -1;
- return FALSE;
+ UPRV_UNREACHABLE;
}
void RuleBasedBreakIterator::DictionaryCache::populateDictionary(int32_t startPos, int32_t endPos,
// Add following position(s) to the cache.
while (fBoundaries[fEndBufIdx] < position) {
if (!populateFollowing()) {
- U_ASSERT(false);
- return false;
+ UPRV_UNREACHABLE;
}
}
fBufIdx = fEndBufIdx; // Set iterator position to the end of the buffer.
fStartBufIdx = modChunkSize(fStartBufIdx + 6); // TODO: experiment. Probably revert to 1.
}
fBoundaries[nextIdx] = position;
- fStatuses[nextIdx] = ruleStatusIdx;
+ fStatuses[nextIdx] = static_cast<uint16_t>(ruleStatusIdx);
fEndBufIdx = nextIdx;
if (update == UpdateCachePosition) {
// Set current position to the newly added boundary.
fEndBufIdx = modChunkSize(fEndBufIdx - 1);
}
fBoundaries[nextIdx] = position;
- fStatuses[nextIdx] = ruleStatusIdx;
+ fStatuses[nextIdx] = static_cast<uint16_t>(ruleStatusIdx);
fStartBufIdx = nextIdx;
if (update == UpdateCachePosition) {
fBufIdx = nextIdx;