parent
faced7a2f0
commit
22eb317bb2
@ -1597,7 +1597,6 @@ DecimalFormat::parse(const UnicodeString& text,
|
||||
|
||||
CurrencyAmount* DecimalFormat::parseCurrency(const UnicodeString& text,
|
||||
ParsePosition& pos) const {
|
||||
CurrencyAmount* currAmtToReturn = NULL;
|
||||
Formattable parseResult;
|
||||
int32_t start = pos.getIndex();
|
||||
UChar curbuf[4];
|
||||
@ -1608,10 +1607,10 @@ CurrencyAmount* DecimalFormat::parseCurrency(const UnicodeString& text,
|
||||
if (U_FAILURE(ec)) {
|
||||
pos.setIndex(start); // indicate failure
|
||||
} else {
|
||||
currAmtToReturn = currAmt.orphan();
|
||||
return currAmt.orphan();
|
||||
}
|
||||
}
|
||||
return currAmtToReturn;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -627,7 +627,6 @@ NumberFormat::parse(const UnicodeString& text,
|
||||
CurrencyAmount* NumberFormat::parseCurrency(const UnicodeString& text,
|
||||
ParsePosition& pos) const {
|
||||
// Default implementation only -- subclasses should override
|
||||
CurrencyAmount* currAmtToReturn = NULL;
|
||||
Formattable parseResult;
|
||||
int32_t start = pos.getIndex();
|
||||
parse(text, parseResult, pos);
|
||||
@ -640,11 +639,11 @@ CurrencyAmount* NumberFormat::parseCurrency(const UnicodeString& text,
|
||||
if (U_FAILURE(ec)) {
|
||||
pos.setIndex(start); // indicate failure
|
||||
} else {
|
||||
currAmtToReturn = currAmt.orphan();
|
||||
return currAmt.orphan();
|
||||
}
|
||||
}
|
||||
}
|
||||
return currAmtToReturn;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// -------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user