fCapitalizationBrkIter(NULL)
{
if(other.fDateTimeFormatter != NULL) {
- fDateTimeFormatter = (SimpleDateFormat*)other.fDateTimeFormatter->clone();
+ fDateTimeFormatter = other.fDateTimeFormatter->clone();
}
if(other.fCombinedFormat != NULL) {
fCombinedFormat = new SimpleFormatter(*other.fCombinedFormat);
}
-Format* RelativeDateFormat::clone(void) const {
+RelativeDateFormat* RelativeDateFormat::clone() const {
return new RelativeDateFormat(*this);
}
if ( fCapitalizationBrkIter == NULL && (value==UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE ||
(value==UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU && fCapitalizationOfRelativeUnitsForUIListMenu) ||
(value==UDISPCTX_CAPITALIZATION_FOR_STANDALONE && fCapitalizationOfRelativeUnitsForStandAlone)) ) {
- UErrorCode status = U_ZERO_ERROR;
+ status = U_ZERO_ERROR;
fCapitalizationBrkIter = BreakIterator::createSentenceInstance(fLocale, status);
if (U_FAILURE(status)) {
delete fCapitalizationBrkIter;
const int32_t * intVector = ures_getIntVector(rb.getAlias(),
&len, &status);
if (U_SUCCESS(status) && intVector != NULL && len >= 2) {
- fCapitalizationOfRelativeUnitsForUIListMenu = intVector[0];
- fCapitalizationOfRelativeUnitsForStandAlone = intVector[1];
+ fCapitalizationOfRelativeUnitsForUIListMenu = static_cast<UBool>(intVector[0]);
+ fCapitalizationOfRelativeUnitsForStandAlone = static_cast<UBool>(intVector[1]);
}
}
#endif