ICU-5161 Fix Purify/valgrind warnings about reading uninitialized memory.

X-SVN-Rev: 19552
This commit is contained in:
George Rhoten 2006-04-15 08:07:30 +00:00
parent ac0ec58b80
commit 7a50d6f62d

View File

@ -128,7 +128,9 @@ RuleBasedCollator::RuleBasedCollator(const UnicodeString& rules,
}
RuleBasedCollator::RuleBasedCollator(const uint8_t *bin, int32_t length,
const RuleBasedCollator *base,
UErrorCode &status) : dataIsOwned(TRUE)
UErrorCode &status) :
dataIsOwned(TRUE),
isWriteThroughAlias(FALSE)
{
ucollator = ucol_openBinary(bin, length, base->ucollator, &status);
}
@ -174,7 +176,6 @@ RuleBasedCollator::~RuleBasedCollator()
ucol_close(ucollator);
}
ucollator = 0;
urulestring = 0;
}
/* RuleBaseCollator public methods --------------------------------------- */
@ -236,7 +237,7 @@ RuleBasedCollator& RuleBasedCollator::operator=(const RuleBasedCollator& that)
// aliasing, not write-through
Collator* RuleBasedCollator::clone() const
{
return new RuleBasedCollator(*this);
return new RuleBasedCollator(*this);
}
CollationElementIterator* RuleBasedCollator::createCollationElementIterator