ICU-6192 do not include internal uvectr32.h from public unicode/fpositer.h
X-SVN-Rev: 27368
This commit is contained in:
parent
a31a559ede
commit
7fcecf9565
@ -8,6 +8,7 @@
|
||||
#if !UCONFIG_NO_FORMAT
|
||||
|
||||
#include "fphdlimp.h"
|
||||
#include "uvectr32.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
* Copyright (C) 2009, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
* Copyright (C) 2009-2010, International Business Machines Corporation and
|
||||
* others. All Rights Reserved.
|
||||
******************************************************************************
|
||||
* Date Name Description
|
||||
* 12/14/09 doug Creation.
|
||||
@ -10,6 +10,7 @@
|
||||
|
||||
#include "unicode/fpositer.h"
|
||||
#include "cmemory.h"
|
||||
#include "uvectr32.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
@ -82,4 +83,20 @@ void FieldPositionIterator::setData(UVector32 *adopt, UErrorCode& status) {
|
||||
pos = adopt == NULL ? -1 : 0;
|
||||
}
|
||||
|
||||
UBool FieldPositionIterator::next(FieldPosition& fp) {
|
||||
if (pos == -1) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
fp.setField(data->elementAti(pos++));
|
||||
fp.setBeginIndex(data->elementAti(pos++));
|
||||
fp.setEndIndex(data->elementAti(pos++));
|
||||
|
||||
if (pos == data->size()) {
|
||||
pos = -1;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
@ -40,10 +40,11 @@ U_NAMESPACE_END
|
||||
|
||||
#include "unicode/fieldpos.h"
|
||||
#include "unicode/umisc.h"
|
||||
#include "uvectr32.h"
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
class UVector32;
|
||||
|
||||
/**
|
||||
* FieldPositionIterator returns the field ids and their start/limit positions generated
|
||||
* by a call to Format::format. See Format, NumberFormat, DecimalFormat.
|
||||
@ -121,22 +122,6 @@ private:
|
||||
int32_t pos;
|
||||
};
|
||||
|
||||
inline UBool FieldPositionIterator::next(FieldPosition& fp) {
|
||||
if (pos == -1) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
fp.setField(data->elementAti(pos++));
|
||||
fp.setBeginIndex(data->elementAti(pos++));
|
||||
fp.setEndIndex(data->elementAti(pos++));
|
||||
|
||||
if (pos == data->size()) {
|
||||
pos = -1;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
U_NAMESPACE_END
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
Loading…
Reference in New Issue
Block a user