ICU-535 fixed some compiler warnings
X-SVN-Rev: 2232
This commit is contained in:
parent
cc30f756d3
commit
123caf9bbd
@ -22,12 +22,12 @@ UClassID TaggedList::fgClassID = 0; // Value is irrelevant
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
StringList::StringList()
|
||||
: fStrings(0), fCount(0)
|
||||
: fCount(0), fStrings(0)
|
||||
{}
|
||||
|
||||
StringList::StringList(UnicodeString *adopted,
|
||||
int32_t count)
|
||||
: fStrings(adopted), fCount(count)
|
||||
int32_t count)
|
||||
: fCount(count), fStrings(adopted)
|
||||
{}
|
||||
|
||||
StringList::~StringList()
|
||||
@ -52,8 +52,8 @@ String2dList::String2dList()
|
||||
{}
|
||||
|
||||
String2dList::String2dList(UnicodeString **adopted,
|
||||
int32_t rowCount,
|
||||
int32_t colCount)
|
||||
int32_t rowCount,
|
||||
int32_t colCount)
|
||||
: fStrings(adopted), fRowCount(rowCount), fColCount(colCount)
|
||||
{}
|
||||
|
||||
@ -67,7 +67,7 @@ String2dList::~String2dList()
|
||||
|
||||
const UnicodeString&
|
||||
String2dList::getString(int32_t rowIndex,
|
||||
int32_t colIndex)
|
||||
int32_t colIndex)
|
||||
{ return fStrings[rowIndex][colIndex]; }
|
||||
|
||||
UClassID
|
||||
@ -96,7 +96,7 @@ int32_t TaggedList::count() const {
|
||||
|
||||
void
|
||||
TaggedList::put(const UnicodeString& tag,
|
||||
const UnicodeString& data) {
|
||||
const UnicodeString& data) {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
hash->put(tag, new UnicodeString(data), status);
|
||||
}
|
||||
|
@ -409,7 +409,7 @@ do the lookup: */
|
||||
|
||||
struct _LocaleLMBCSGrpMap
|
||||
{
|
||||
char *LocaleID;
|
||||
const char *LocaleID;
|
||||
ulmbcs_byte_t OptGroup;
|
||||
} LocaleLMBCSGrpMap[] =
|
||||
{
|
||||
@ -456,8 +456,8 @@ struct _LocaleLMBCSGrpMap
|
||||
"zh", ULMBCS_GRP_CN,
|
||||
NULL, ULMBCS_GRP_L1
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
ulmbcs_byte_t
|
||||
FindLMBCSLocale(const char *LocaleID)
|
||||
{
|
||||
@ -472,9 +472,9 @@ FindLMBCSLocale(const char *LocaleID)
|
||||
{
|
||||
if (*pTable->LocaleID == *LocaleID) /* Check only first char for speed */
|
||||
{
|
||||
/* First char matches - check whole name, for entry-length */
|
||||
/* First char matches - check whole name, for entry-length */
|
||||
if (strncmp(pTable->LocaleID, LocaleID, strlen(pTable->LocaleID)) == 0)
|
||||
return pTable->OptGroup;
|
||||
return pTable->OptGroup;
|
||||
}
|
||||
else
|
||||
if (*pTable->LocaleID > *LocaleID) /* Sorted alphabetically - exit */
|
||||
|
@ -14,8 +14,8 @@
|
||||
UBool UVector::outOfMemory = FALSE;
|
||||
|
||||
UVector::UVector(int32_t initialCapacity) :
|
||||
capacity(0),
|
||||
count(0),
|
||||
capacity(0),
|
||||
elements(0),
|
||||
deleter(0),
|
||||
comparer(0) {
|
||||
@ -24,8 +24,8 @@ UVector::UVector(int32_t initialCapacity) :
|
||||
}
|
||||
|
||||
UVector::UVector(Deleter d, Comparer c, int32_t initialCapacity) :
|
||||
capacity(0),
|
||||
count(0),
|
||||
capacity(0),
|
||||
elements(0),
|
||||
deleter(d),
|
||||
comparer(c) {
|
||||
|
@ -39,11 +39,11 @@ int32_t const CollationElementIterator::UNMAPPEDCHARVALUE = 0x7fff0000;
|
||||
// This private method will never be called, but it makes the linker happy
|
||||
|
||||
CollationElementIterator::CollationElementIterator()
|
||||
: expIndex(0),
|
||||
text(0),
|
||||
: text(0),
|
||||
bufferAlias(0),
|
||||
ownBuffer(new VectorOfInt(2)),
|
||||
reorderBuffer(0),
|
||||
expIndex(0),
|
||||
orderAlias(0)
|
||||
{
|
||||
}
|
||||
@ -51,11 +51,11 @@ CollationElementIterator::CollationElementIterator()
|
||||
// This private method will never be called, but it makes the linker happy
|
||||
|
||||
CollationElementIterator::CollationElementIterator(const RuleBasedCollator* order)
|
||||
: expIndex(0),
|
||||
text(0),
|
||||
: text(0),
|
||||
bufferAlias(0),
|
||||
ownBuffer(new VectorOfInt(2)),
|
||||
reorderBuffer(0),
|
||||
expIndex(0),
|
||||
orderAlias(order)
|
||||
{
|
||||
}
|
||||
@ -65,11 +65,11 @@ CollationElementIterator::CollationElementIterator(const RuleBasedCollator* orde
|
||||
CollationElementIterator::CollationElementIterator( const UnicodeString& sourceText,
|
||||
const RuleBasedCollator* order,
|
||||
UErrorCode& status)
|
||||
: expIndex(0),
|
||||
text(NULL),
|
||||
: text(NULL),
|
||||
bufferAlias(NULL),
|
||||
ownBuffer(new VectorOfInt(2)),
|
||||
reorderBuffer(0),
|
||||
expIndex(0),
|
||||
orderAlias(order)
|
||||
{
|
||||
if (U_FAILURE(status)) {
|
||||
@ -102,11 +102,11 @@ CollationElementIterator::CollationElementIterator( const UnicodeString& sourceT
|
||||
CollationElementIterator::CollationElementIterator( const CharacterIterator& sourceText,
|
||||
const RuleBasedCollator* order,
|
||||
UErrorCode& status)
|
||||
: expIndex(0),
|
||||
text(NULL),
|
||||
: text(NULL),
|
||||
bufferAlias(NULL),
|
||||
ownBuffer(new VectorOfInt(2)),
|
||||
reorderBuffer(0),
|
||||
expIndex(0),
|
||||
orderAlias(order)
|
||||
{
|
||||
if (U_FAILURE(status)) {
|
||||
@ -136,9 +136,9 @@ CollationElementIterator::CollationElementIterator( const CharacterIterator& sou
|
||||
}
|
||||
|
||||
CollationElementIterator::CollationElementIterator(const CollationElementIterator& other)
|
||||
: expIndex(other.expIndex), text(0),
|
||||
ownBuffer(new VectorOfInt(2)),
|
||||
reorderBuffer(0)
|
||||
: ownBuffer(new VectorOfInt(2)),
|
||||
reorderBuffer(0),
|
||||
expIndex(other.expIndex), text(0)
|
||||
{
|
||||
*this = other;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ CompoundTransliterator::CompoundTransliterator(
|
||||
int32_t count,
|
||||
UnicodeFilter* adoptedFilter) :
|
||||
Transliterator(joinIDs(transliterators, count), adoptedFilter),
|
||||
trans(0), count(0), filters(0) {
|
||||
trans(0), filters(0), count(0) {
|
||||
setTransliterators(transliterators, count);
|
||||
}
|
||||
|
||||
@ -44,14 +44,14 @@ CompoundTransliterator::CompoundTransliterator(const UnicodeString& ID,
|
||||
UnicodeFilter* adoptedFilter,
|
||||
UErrorCode& status) :
|
||||
Transliterator(ID, 0), // set filter to 0 here!
|
||||
filters(0), trans(0) {
|
||||
trans(0), filters(0) {
|
||||
init(ID, direction, adoptedFilter, status);
|
||||
}
|
||||
|
||||
CompoundTransliterator::CompoundTransliterator(const UnicodeString& ID,
|
||||
UErrorCode& status) :
|
||||
Transliterator(ID, 0), // set filter to 0 here!
|
||||
filters(0), trans(0) {
|
||||
trans(0), filters(0) {
|
||||
init(ID, UTRANS_FORWARD, 0, status);
|
||||
}
|
||||
|
||||
|
@ -100,8 +100,8 @@ const char *DecimalFormat::fgNumberPatterns="NumberPatterns";
|
||||
DecimalFormat::DecimalFormat(UErrorCode& status)
|
||||
: NumberFormat(),
|
||||
fPosPrefixPattern(0),
|
||||
fNegPrefixPattern(0),
|
||||
fPosSuffixPattern(0),
|
||||
fNegPrefixPattern(0),
|
||||
fNegSuffixPattern(0),
|
||||
fSymbols(0)
|
||||
{
|
||||
@ -116,8 +116,8 @@ DecimalFormat::DecimalFormat(const UnicodeString& pattern,
|
||||
UErrorCode& status)
|
||||
: NumberFormat(),
|
||||
fPosPrefixPattern(0),
|
||||
fNegPrefixPattern(0),
|
||||
fPosSuffixPattern(0),
|
||||
fNegPrefixPattern(0),
|
||||
fNegSuffixPattern(0),
|
||||
fSymbols(0)
|
||||
{
|
||||
@ -134,8 +134,8 @@ DecimalFormat::DecimalFormat(const UnicodeString& pattern,
|
||||
UErrorCode& status)
|
||||
: NumberFormat(),
|
||||
fPosPrefixPattern(0),
|
||||
fNegPrefixPattern(0),
|
||||
fPosSuffixPattern(0),
|
||||
fNegPrefixPattern(0),
|
||||
fNegSuffixPattern(0),
|
||||
fSymbols(0)
|
||||
{
|
||||
@ -153,8 +153,8 @@ DecimalFormat::DecimalFormat(const UnicodeString& pattern,
|
||||
UErrorCode& status)
|
||||
: NumberFormat(),
|
||||
fPosPrefixPattern(0),
|
||||
fNegPrefixPattern(0),
|
||||
fPosSuffixPattern(0),
|
||||
fNegPrefixPattern(0),
|
||||
fNegSuffixPattern(0),
|
||||
fSymbols(0)
|
||||
{
|
||||
|
@ -42,10 +42,10 @@ NumberFormat* MessageFormat::fgNumberFormat = 0;
|
||||
|
||||
MessageFormat::MessageFormat(const UnicodeString& pattern,
|
||||
UErrorCode& success)
|
||||
: fOffsets(NULL),
|
||||
fArgumentNumbers(NULL),
|
||||
fLocale(Locale::getDefault()), // Uses the default locale
|
||||
fCount(0)
|
||||
: fLocale(Locale::getDefault()), // Uses the default locale
|
||||
fOffsets(NULL),
|
||||
fCount(0),
|
||||
fArgumentNumbers(NULL)
|
||||
{
|
||||
fCount = kMaxFormat;
|
||||
fOffsets = new int32_t[fCount];
|
||||
@ -61,10 +61,10 @@ MessageFormat::MessageFormat(const UnicodeString& pattern,
|
||||
MessageFormat::MessageFormat(const UnicodeString& pattern,
|
||||
const Locale& newLocale,
|
||||
UErrorCode& success)
|
||||
: fOffsets(NULL),
|
||||
fArgumentNumbers(NULL),
|
||||
fLocale(newLocale), // Uses the default locale
|
||||
fCount(0)
|
||||
: fLocale(newLocale), // Uses the default locale
|
||||
fOffsets(NULL),
|
||||
fCount(0),
|
||||
fArgumentNumbers(NULL)
|
||||
{
|
||||
fCount = kMaxFormat;
|
||||
fOffsets = new int32_t[fCount];
|
||||
|
@ -39,22 +39,22 @@ const int8_t SimpleTimeZone::staticMonthLength[] = {31,28,31,30,31,30,31,31,30,3
|
||||
|
||||
|
||||
SimpleTimeZone::SimpleTimeZone(int32_t rawOffset, const UnicodeString& ID)
|
||||
: rawOffset(rawOffset),
|
||||
startMonth(0),
|
||||
: startMonth(0),
|
||||
startDay(0),
|
||||
startDayOfWeek(0),
|
||||
startTime(0),
|
||||
startTimeMode(WALL_TIME),
|
||||
endTimeMode(WALL_TIME),
|
||||
endMonth(0),
|
||||
endDay(0),
|
||||
endDayOfWeek(0),
|
||||
endTime(0),
|
||||
endTimeMode(WALL_TIME),
|
||||
startYear(0),
|
||||
dstSavings(U_MILLIS_PER_HOUR),
|
||||
rawOffset(rawOffset),
|
||||
useDaylight(FALSE),
|
||||
startMode(DOM_MODE),
|
||||
endMode(DOM_MODE),
|
||||
useDaylight(FALSE)
|
||||
dstSavings(U_MILLIS_PER_HOUR)
|
||||
{
|
||||
setID(ID);
|
||||
}
|
||||
@ -408,12 +408,12 @@ SimpleTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
|
||||
uint8_t dayOfWeek, int32_t millis,
|
||||
int32_t monthLength, UErrorCode& status) const {
|
||||
// Check the month before indexing into staticMonthLength. This
|
||||
// duplicates a test that occurs in the 9-argument getOffset(),
|
||||
// however, this is unavoidable. We don't mind because this method, in
|
||||
// fact, should not be called; internal code should always call the
|
||||
// 9-argument getOffset(), and outside code should use Calendar.get(int
|
||||
// field) with fields ZONE_OFFSET and DST_OFFSET. We can't get rid of
|
||||
// this method because it's public API. - liu 8/10/98
|
||||
// duplicates a test that occurs in the 9-argument getOffset(),
|
||||
// however, this is unavoidable. We don't mind because this method, in
|
||||
// fact, should not be called; internal code should always call the
|
||||
// 9-argument getOffset(), and outside code should use Calendar.get(int
|
||||
// field) with fields ZONE_OFFSET and DST_OFFSET. We can't get rid of
|
||||
// this method because it's public API. - liu 8/10/98
|
||||
if (month < Calendar::JANUARY
|
||||
|| month > Calendar::DECEMBER) {
|
||||
status = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
@ -421,7 +421,7 @@ SimpleTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
|
||||
}
|
||||
|
||||
// TODO FIX We don't handle leap years yet!
|
||||
int32_t prevMonthLength = (month >= 1) ? staticMonthLength[month - 1] : 31;
|
||||
int32_t prevMonthLength = (month >= 1) ? staticMonthLength[month - 1] : 31;
|
||||
|
||||
return getOffset(era, year, month, day, dayOfWeek, millis,
|
||||
monthLength, prevMonthLength, status);
|
||||
|
@ -39,14 +39,14 @@ const int32_t CollationKey::kInvalidHashCode = 0;
|
||||
const int32_t CollationKey::kEmptyHashCode = 1;
|
||||
|
||||
CollationKey::CollationKey()
|
||||
: fCount(0), fCapacity(0), fBogus(FALSE),
|
||||
: fBogus(FALSE), fCount(0), fCapacity(0),
|
||||
fHashCode(kEmptyHashCode), fBytes(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
// Create a collation key from a bit array.
|
||||
CollationKey::CollationKey(const uint8_t* newValues, int32_t count)
|
||||
: fCount(count), fCapacity(count), fBogus(FALSE),
|
||||
: fBogus(FALSE), fCount(count), fCapacity(count),
|
||||
fHashCode(kInvalidHashCode)
|
||||
{
|
||||
fBytes = new uint8_t[count];
|
||||
|
@ -182,9 +182,9 @@ NormalizerIterator::NormalizerIterator() :
|
||||
reorderBuffer(0),
|
||||
ownBuffer(2),
|
||||
text(0),
|
||||
expIndex(0),
|
||||
textLen(0),
|
||||
currentOffset(0),
|
||||
expIndex(0)
|
||||
currentOffset(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -195,9 +195,9 @@ NormalizerIterator::NormalizerIterator(const UChar* source, int32_t length, Norm
|
||||
reorderBuffer(0),
|
||||
ownBuffer(2),
|
||||
text(0),
|
||||
expIndex(0),
|
||||
textLen(0),
|
||||
currentOffset(0),
|
||||
expIndex(0)
|
||||
currentOffset(0)
|
||||
{
|
||||
if (mode == Normalizer::NO_OP) {
|
||||
text = (UChar*)source;
|
||||
@ -502,8 +502,8 @@ RuleBasedCollator::RuleBasedCollator()
|
||||
//targetCursor(0),
|
||||
cursor1(0),
|
||||
cursor2(0),
|
||||
data(0),
|
||||
dataIsOwned(FALSE)
|
||||
dataIsOwned(FALSE),
|
||||
data(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -585,8 +585,8 @@ RuleBasedCollator::RuleBasedCollator(const UnicodeString& rules,
|
||||
/// targetCursor(0),
|
||||
cursor1(0),
|
||||
cursor2(0),
|
||||
data(0),
|
||||
dataIsOwned(FALSE)
|
||||
dataIsOwned(FALSE),
|
||||
data(0)
|
||||
{
|
||||
if (U_FAILURE(status))
|
||||
{
|
||||
@ -604,10 +604,10 @@ RuleBasedCollator::RuleBasedCollator(const UnicodeString& rules,
|
||||
mPattern(0),
|
||||
// sourceCursor(0),
|
||||
// targetCursor(0),
|
||||
cursor1(0),
|
||||
cursor2(0),
|
||||
data(0),
|
||||
dataIsOwned(FALSE)
|
||||
cursor1(0),
|
||||
cursor2(0),
|
||||
dataIsOwned(FALSE),
|
||||
data(0)
|
||||
{
|
||||
if (U_FAILURE(status))
|
||||
{
|
||||
@ -624,10 +624,10 @@ RuleBasedCollator::RuleBasedCollator(const UnicodeString& rules,
|
||||
mPattern(0),
|
||||
// sourceCursor(0),
|
||||
// targetCursor(0),
|
||||
cursor1(0),
|
||||
cursor2(0),
|
||||
data(0),
|
||||
dataIsOwned(FALSE)
|
||||
cursor1(0),
|
||||
cursor2(0),
|
||||
dataIsOwned(FALSE),
|
||||
data(0)
|
||||
{
|
||||
if (U_FAILURE(status))
|
||||
{
|
||||
@ -648,8 +648,8 @@ RuleBasedCollator::RuleBasedCollator(const UnicodeString& rules,
|
||||
//targetCursor(0),
|
||||
cursor1(0),
|
||||
cursor2(0),
|
||||
data(0),
|
||||
dataIsOwned(FALSE)
|
||||
dataIsOwned(FALSE),
|
||||
data(0)
|
||||
{
|
||||
if (U_FAILURE(status))
|
||||
{
|
||||
@ -840,13 +840,13 @@ RuleBasedCollator::RuleBasedCollator( const Locale& desiredLocale,
|
||||
UErrorCode& status)
|
||||
: Collator(),
|
||||
isOverIgnore(FALSE),
|
||||
dataIsOwned(FALSE),
|
||||
data(0),
|
||||
// sourceCursor(0),
|
||||
//targetCursor(0),
|
||||
cursor1(0),
|
||||
cursor2(0),
|
||||
mPattern(0)
|
||||
mPattern(0),
|
||||
dataIsOwned(FALSE),
|
||||
data(0)
|
||||
{
|
||||
|
||||
|
||||
|
@ -85,7 +85,7 @@ class RuleBasedCollator;
|
||||
*/
|
||||
class U_I18N_API CollationElementIterator
|
||||
{
|
||||
public:
|
||||
public:
|
||||
/**
|
||||
* NULLORDER indicates the iterator has consumed the last element.
|
||||
*/
|
||||
@ -147,7 +147,7 @@ public:
|
||||
* Gets the tertiary order of a collation order.
|
||||
* @param order the collation order
|
||||
* @return the tertiary order of a collation order.
|
||||
* @stable
|
||||
* @stable
|
||||
*/
|
||||
static int32_t tertiaryOrder(int32_t order);
|
||||
/**
|
||||
@ -156,7 +156,7 @@ public:
|
||||
* @param order a collation order returned by previous or next.
|
||||
* @return the maximum length of any expansion sequences ending
|
||||
* with the specified order.
|
||||
* @stable
|
||||
* @stable
|
||||
*/
|
||||
int32_t getMaxExpansion(int32_t order) const;
|
||||
|
||||
@ -165,14 +165,14 @@ public:
|
||||
* Gets the comparison order in the desired strength. Ignore the other
|
||||
* differences.
|
||||
* @param order The order value
|
||||
* @stable
|
||||
* @stable
|
||||
*/
|
||||
int32_t strengthOrder(int32_t order) const;
|
||||
/**
|
||||
* Sets the source string.
|
||||
* @param str the source string.
|
||||
* @param status the error code status.
|
||||
* @stable
|
||||
* @stable
|
||||
*/
|
||||
void setText(const UnicodeString& str,
|
||||
UErrorCode& status);
|
||||
@ -180,7 +180,7 @@ public:
|
||||
* Sets the source string.
|
||||
* @param str the source character iterator.
|
||||
* @param status the error code status.
|
||||
* @stable
|
||||
* @stable
|
||||
*/
|
||||
void setText(CharacterIterator& str,
|
||||
UErrorCode& status);
|
||||
@ -188,13 +188,13 @@ public:
|
||||
* Checks if a comparison order is ignorable.
|
||||
* @param order the collation order.
|
||||
* @return TRUE if a character is ignorable, FALSE otherwise.
|
||||
* @stable
|
||||
* @stable
|
||||
*/
|
||||
static UBool isIgnorable(int32_t order);
|
||||
/**
|
||||
* Gets the offset of the currently processed character in the source string.
|
||||
* @return the offset of the character.
|
||||
* @stable
|
||||
* @stable
|
||||
*/
|
||||
UTextOffset getOffset(void) const;
|
||||
/**
|
||||
@ -202,11 +202,11 @@ public:
|
||||
* @param newOffset the new offset.
|
||||
* @param status the error code status.
|
||||
* @return the offset of the character.
|
||||
* @stable
|
||||
* @stable
|
||||
*/
|
||||
void setOffset(UTextOffset newOffset,
|
||||
UErrorCode& status);
|
||||
/* CollationElementIterator should not be subclassed. */
|
||||
/* CollationElementIterator should not be subclassed. */
|
||||
protected:
|
||||
/**
|
||||
* CollationElementIterator constructor. This takes the source string and
|
||||
@ -219,7 +219,7 @@ protected:
|
||||
* @param endOffset the ending offset of the string where the cursor
|
||||
* stops the iterating.
|
||||
* @param order the collation object.
|
||||
* @stable
|
||||
* @stable
|
||||
*/
|
||||
CollationElementIterator( const UnicodeString& sourceText,
|
||||
const RuleBasedCollator* order,
|
||||
@ -236,21 +236,21 @@ protected:
|
||||
* @param endOffset the ending offset of the string where the cursor
|
||||
* stops the iterating.
|
||||
* @param order the collation object.
|
||||
* @stable
|
||||
* @stable
|
||||
*/
|
||||
CollationElementIterator( const CharacterIterator& sourceText,
|
||||
const RuleBasedCollator* order,
|
||||
UErrorCode& status);
|
||||
/**
|
||||
* Assignment operator
|
||||
* @stable
|
||||
* @stable
|
||||
*/
|
||||
const CollationElementIterator&
|
||||
operator=(const CollationElementIterator& other);
|
||||
public:
|
||||
/**
|
||||
* Copy constructor.
|
||||
* @stable
|
||||
* @stable
|
||||
*/
|
||||
CollationElementIterator(const CollationElementIterator& other);
|
||||
//============================================================
|
||||
|
Loading…
Reference in New Issue
Block a user