ICU-535 fixed some compiler warnings
X-SVN-Rev: 2342
This commit is contained in:
parent
2e2ee935df
commit
1130462c8d
@ -18,21 +18,21 @@
|
||||
* 02/22/99 stephen Removed character literals for EBCDIC safety
|
||||
********************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include "unicode/msgfmt.h"
|
||||
#include "unicode/decimfmt.h"
|
||||
#include "unicode/datefmt.h"
|
||||
#include "unicode/smpdtfmt.h"
|
||||
#include "unicode/choicfmt.h"
|
||||
#include "mutex.h"
|
||||
|
||||
|
||||
// *****************************************************************************
|
||||
// class MessageFormat
|
||||
// *****************************************************************************
|
||||
|
||||
|
||||
// -------------------------------------
|
||||
char MessageFormat::fgClassID = 0; // Value is irrelevant
|
||||
|
||||
|
||||
// This global NumberFormat instance is shared by all MessageFormat to
|
||||
// convert a number to(format)/from(parse) a string.
|
||||
NumberFormat* MessageFormat::fgNumberFormat = 0;
|
||||
@ -90,16 +90,14 @@ MessageFormat::~MessageFormat()
|
||||
// copy constructor
|
||||
|
||||
MessageFormat::MessageFormat(const MessageFormat& that)
|
||||
: Format(that),
|
||||
fOffsets(NULL),
|
||||
fCount(that.fCount),
|
||||
fLocale(that.fLocale),
|
||||
fMaxOffset(that.fMaxOffset),
|
||||
fArgumentNumbers(NULL),
|
||||
fPattern(that.fPattern)
|
||||
: Format(that),
|
||||
fLocale(that.fLocale),
|
||||
fPattern(that.fPattern),
|
||||
fOffsets(new int32_t[that.fCount]),
|
||||
fCount(that.fCount),
|
||||
fArgumentNumbers(new int32_t[that.fCount]),
|
||||
fMaxOffset(that.fMaxOffset)
|
||||
{
|
||||
fOffsets = new int32_t[fCount];
|
||||
fArgumentNumbers = new int32_t[fCount];
|
||||
// Sets up the format instance array, offsets and argument numbers.
|
||||
for (int32_t i = 0; i < fCount; i++) {
|
||||
fFormats[i] = NULL; // init since delete may be called
|
||||
|
@ -46,8 +46,8 @@ RuleBasedBreakIterator::fgClassID = 0;
|
||||
* tables object that is passed in as a parameter.
|
||||
*/
|
||||
RuleBasedBreakIterator::RuleBasedBreakIterator(RuleBasedBreakIteratorTables* tables)
|
||||
: tables(tables),
|
||||
text(NULL)
|
||||
: text(NULL),
|
||||
tables(tables)
|
||||
{
|
||||
}
|
||||
|
||||
@ -55,8 +55,8 @@ RuleBasedBreakIterator::RuleBasedBreakIterator(RuleBasedBreakIteratorTables* tab
|
||||
// internal tables live in a memory-mapped file. "image" is a pointer to the
|
||||
// beginning of that file.
|
||||
RuleBasedBreakIterator::RuleBasedBreakIterator(UDataMemory* image)
|
||||
: tables(image != NULL ? new RuleBasedBreakIteratorTables(image) : NULL),
|
||||
text(NULL)
|
||||
: text(NULL),
|
||||
tables(image != NULL ? new RuleBasedBreakIteratorTables(image) : NULL)
|
||||
{
|
||||
if (tables != NULL)
|
||||
tables->addReference();
|
||||
@ -67,8 +67,8 @@ RuleBasedBreakIterator::RuleBasedBreakIterator(UDataMemory* image)
|
||||
* and which iterates over the same text, as the one passed in.
|
||||
*/
|
||||
RuleBasedBreakIterator::RuleBasedBreakIterator(const RuleBasedBreakIterator& that)
|
||||
: tables(that.tables),
|
||||
text(that.text->clone())
|
||||
: text(that.text->clone()),
|
||||
tables(that.tables)
|
||||
{
|
||||
tables->addReference();
|
||||
}
|
||||
@ -207,7 +207,7 @@ RuleBasedBreakIterator::setText(const UnicodeString& newText) {
|
||||
}
|
||||
else {
|
||||
delete text;
|
||||
text = new StringCharacterIterator(newText);
|
||||
text = new StringCharacterIterator(newText);
|
||||
text->first();
|
||||
}
|
||||
}
|
||||
|
@ -66,8 +66,8 @@ CollationKey::CollationKey(const UnicodeString& value)
|
||||
}
|
||||
|
||||
CollationKey::CollationKey(const CollationKey& other)
|
||||
: fCount(other.fCount), fCapacity(other.fCapacity), fBogus(FALSE),
|
||||
fHashCode(other.fHashCode), fBytes(NULL)
|
||||
: fBogus(FALSE), fCount(other.fCount), fCapacity(other.fCapacity),
|
||||
fHashCode(other.fHashCode), fBytes(NULL)
|
||||
{
|
||||
if (other.fBogus)
|
||||
{
|
||||
|
@ -842,9 +842,9 @@ RuleBasedCollator::RuleBasedCollator( const Locale& desiredLocale,
|
||||
isOverIgnore(FALSE),
|
||||
// sourceCursor(0),
|
||||
//targetCursor(0),
|
||||
mPattern(0),
|
||||
cursor1(0),
|
||||
cursor2(0),
|
||||
mPattern(0),
|
||||
dataIsOwned(FALSE),
|
||||
data(0)
|
||||
{
|
||||
|
@ -37,8 +37,8 @@ TableCollationData::TableCollationData()
|
||||
: isFrenchSec(FALSE),
|
||||
maxSecOrder(0),
|
||||
maxTerOrder(0),
|
||||
isRuleTableLoaded(FALSE),
|
||||
fBogus(FALSE)
|
||||
fBogus(FALSE),
|
||||
isRuleTableLoaded(FALSE)
|
||||
{
|
||||
mapping = 0;
|
||||
contractTable = 0;
|
||||
|
@ -125,8 +125,9 @@ UnicodeSet::UnicodeSet(const UnicodeString& pattern, ParsePosition& pos,
|
||||
* returned by <code>Unicode::getType()</code>.
|
||||
*/
|
||||
UnicodeSet::UnicodeSet(int8_t category, UErrorCode& status) :
|
||||
len(0), capacity(START_EXTRA), list(0), bufferCapacity(0),
|
||||
buffer(0) {
|
||||
len(0), capacity(START_EXTRA), bufferCapacity(0), list(0),
|
||||
buffer(0)
|
||||
{
|
||||
|
||||
if (U_SUCCESS(status)) {
|
||||
if (category < 0 || category >= Unicode::GENERAL_TYPES_COUNT) {
|
||||
@ -142,8 +143,9 @@ UnicodeSet::UnicodeSet(int8_t category, UErrorCode& status) :
|
||||
* Constructs a set that is identical to the given UnicodeSet.
|
||||
*/
|
||||
UnicodeSet::UnicodeSet(const UnicodeSet& o) :
|
||||
list(0), capacity(o.len + GROW_EXTRA), bufferCapacity(0),
|
||||
buffer(0) {
|
||||
capacity(o.len + GROW_EXTRA), bufferCapacity(0),
|
||||
buffer(0)
|
||||
{
|
||||
|
||||
list = new UChar32[capacity];
|
||||
*this = o;
|
||||
@ -518,7 +520,7 @@ void UnicodeSet::complement(UChar32 c) {
|
||||
*
|
||||
* @param c set to be checked for containment in this set.
|
||||
* @return <tt>true</tt> if this set contains all of the elements of the
|
||||
* specified set.
|
||||
* specified set.
|
||||
*/
|
||||
UBool UnicodeSet::containsAll(const UnicodeSet& c) const {
|
||||
// The specified set is a subset if all of its pairs are contained in
|
||||
@ -1011,7 +1013,7 @@ void UnicodeSet::applyCategory(const UnicodeString& catName,
|
||||
return;
|
||||
}
|
||||
|
||||
UnicodeString cat(catName);
|
||||
UnicodeString cat(catName);
|
||||
UBool invert = (catName.length() > 1 &&
|
||||
catName.charAt(0) == COMPLEMENT);
|
||||
if (invert) {
|
||||
|
Loading…
Reference in New Issue
Block a user