ICU-5032 Increase code coverage by removing dead code.
X-SVN-Rev: 19490
This commit is contained in:
parent
f12fa33ed7
commit
714c0ec3c1
@ -180,11 +180,8 @@ stringIteratorGetState(const UCharIterator *iter) {
|
||||
|
||||
static void U_CALLCONV
|
||||
stringIteratorSetState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode) {
|
||||
if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
|
||||
/* do nothing */
|
||||
} else if(iter==NULL) {
|
||||
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
|
||||
} else if((int32_t)state<iter->start || iter->limit<(int32_t)state) {
|
||||
/* Some parameter checking has already been done by uiter_setState */
|
||||
if((int32_t)state<iter->start || iter->limit<(int32_t)state) {
|
||||
*pErrorCode=U_INDEX_OUTOFBOUNDS_ERROR;
|
||||
} else {
|
||||
iter->index=(int32_t)state;
|
||||
@ -440,7 +437,7 @@ characterIteratorGetState(const UCharIterator *iter) {
|
||||
|
||||
static void U_CALLCONV
|
||||
characterIteratorSetState(UCharIterator *iter, uint32_t state, UErrorCode *pErrorCode) {
|
||||
/* Some argument checking has already been done by uiter_setState */
|
||||
/* Some parameter checking has already been done by uiter_setState */
|
||||
if(iter->context==NULL) {
|
||||
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
|
||||
} else if((int32_t)state<((CharacterIterator *)(iter->context))->startIndex() || ((CharacterIterator *)(iter->context))->endIndex()<(int32_t)state) {
|
||||
@ -963,11 +960,8 @@ utf8IteratorSetState(UCharIterator *iter,
|
||||
uint32_t state,
|
||||
UErrorCode *pErrorCode)
|
||||
{
|
||||
if(pErrorCode==NULL || U_FAILURE(*pErrorCode)) {
|
||||
/* do nothing */
|
||||
} else if(iter==NULL) {
|
||||
*pErrorCode=U_ILLEGAL_ARGUMENT_ERROR;
|
||||
} else if(state==utf8IteratorGetState(iter)) {
|
||||
/* Some parameter checking has already been done by uiter_setState */
|
||||
if(state==utf8IteratorGetState(iter)) {
|
||||
/* setting to the current state: no-op */
|
||||
} else {
|
||||
int32_t index=(int32_t)(state>>1); /* UTF-8 index */
|
||||
|
Loading…
Reference in New Issue
Block a user