Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: third_party/icu/source/i18n/unum.cpp

Issue 6520018: Get ICU 4.6 to be compiled without RTTI.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: do not include typeinfo at all Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/icu/source/i18n/udat.cpp ('k') | third_party/icu/source/i18n/vtzone.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/icu/source/i18n/unum.cpp
===================================================================
--- third_party/icu/source/i18n/unum.cpp (revision 74230)
+++ third_party/icu/source/i18n/unum.cpp (working copy)
@@ -168,11 +168,11 @@
Format *res = 0;
const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt);
- const DecimalFormat* df = dynamic_cast<const DecimalFormat*>(nf);
+ const DecimalFormat* df = CR_DYNAMIC_CAST<const DecimalFormat*>(nf);
if (df != NULL) {
res = df->clone();
} else {
- const RuleBasedNumberFormat* rbnf = dynamic_cast<const RuleBasedNumberFormat*>(nf);
+ const RuleBasedNumberFormat* rbnf = CR_DYNAMIC_CAST<const RuleBasedNumberFormat*>(nf);
U_ASSERT(rbnf != NULL);
res = rbnf->clone();
}
@@ -460,7 +460,7 @@
currency[0] = 0;
const CurrencyAmount* c;
if (res.getType() == Formattable::kObject &&
- (c = dynamic_cast<const CurrencyAmount*>(res.getObject())) != NULL) {
+ (c = CR_DYNAMIC_CAST<const CurrencyAmount*>(res.getObject())) != NULL) {
u_strcpy(currency, c->getISOCurrency());
}
return res.getDouble(*status);
@@ -483,7 +483,7 @@
UNumberFormatAttribute attr)
{
const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt);
- const DecimalFormat* df = dynamic_cast<const DecimalFormat*>(nf);
+ const DecimalFormat* df = CR_DYNAMIC_CAST<const DecimalFormat*>(nf);
if (df != NULL) {
switch(attr) {
case UNUM_PARSE_INT_ONLY:
@@ -547,7 +547,7 @@
break;
}
} else {
- const RuleBasedNumberFormat* rbnf = dynamic_cast<const RuleBasedNumberFormat*>(nf);
+ const RuleBasedNumberFormat* rbnf = CR_DYNAMIC_CAST<const RuleBasedNumberFormat*>(nf);
U_ASSERT(rbnf != NULL);
if (attr == UNUM_LENIENT_PARSE) {
#if !UCONFIG_NO_COLLATION
@@ -565,7 +565,7 @@
int32_t newValue)
{
NumberFormat* nf = reinterpret_cast<NumberFormat*>(fmt);
- DecimalFormat* df = dynamic_cast<DecimalFormat*>(nf);
+ DecimalFormat* df = CR_DYNAMIC_CAST<DecimalFormat*>(nf);
if (df != NULL) {
switch(attr) {
case UNUM_PARSE_INT_ONLY:
@@ -648,7 +648,7 @@
break;
}
} else {
- RuleBasedNumberFormat* rbnf = dynamic_cast<RuleBasedNumberFormat*>(nf);
+ RuleBasedNumberFormat* rbnf = CR_DYNAMIC_CAST<RuleBasedNumberFormat*>(nf);
U_ASSERT(rbnf != NULL);
if (attr == UNUM_LENIENT_PARSE) {
#if !UCONFIG_NO_COLLATION
@@ -663,7 +663,7 @@
UNumberFormatAttribute attr)
{
const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt);
- const DecimalFormat* df = dynamic_cast<const DecimalFormat*>(nf);
+ const DecimalFormat* df = CR_DYNAMIC_CAST<const DecimalFormat*>(nf);
if (df != NULL && attr == UNUM_ROUNDING_INCREMENT) {
return df->getRoundingIncrement();
} else {
@@ -677,7 +677,7 @@
double newValue)
{
NumberFormat* nf = reinterpret_cast<NumberFormat*>(fmt);
- DecimalFormat* df = dynamic_cast<DecimalFormat*>(nf);
+ DecimalFormat* df = CR_DYNAMIC_CAST<DecimalFormat*>(nf);
if (df != NULL && attr == UNUM_ROUNDING_INCREMENT) {
df->setRoundingIncrement(newValue);
}
@@ -701,7 +701,7 @@
}
const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt);
- const DecimalFormat* df = dynamic_cast<const DecimalFormat*>(nf);
+ const DecimalFormat* df = CR_DYNAMIC_CAST<const DecimalFormat*>(nf);
if (df != NULL) {
switch(tag) {
case UNUM_POSITIVE_PREFIX:
@@ -733,7 +733,7 @@
return -1;
}
} else {
- const RuleBasedNumberFormat* rbnf = dynamic_cast<const RuleBasedNumberFormat*>(nf);
+ const RuleBasedNumberFormat* rbnf = CR_DYNAMIC_CAST<const RuleBasedNumberFormat*>(nf);
U_ASSERT(rbnf != NULL);
if (tag == UNUM_DEFAULT_RULESET) {
res = rbnf->getDefaultRuleSetName();
@@ -765,7 +765,7 @@
int32_t len = (newValueLength == -1 ? u_strlen(newValue) : newValueLength);
const UnicodeString val((UChar*)newValue, len, len);
NumberFormat* nf = reinterpret_cast<NumberFormat*>(fmt);
- DecimalFormat* df = dynamic_cast<DecimalFormat*>(nf);
+ DecimalFormat* df = CR_DYNAMIC_CAST<DecimalFormat*>(nf);
if (df != NULL) {
switch(tag) {
case UNUM_POSITIVE_PREFIX:
@@ -797,7 +797,7 @@
break;
}
} else {
- RuleBasedNumberFormat* rbnf = dynamic_cast<RuleBasedNumberFormat*>(nf);
+ RuleBasedNumberFormat* rbnf = CR_DYNAMIC_CAST<RuleBasedNumberFormat*>(nf);
U_ASSERT(rbnf != NULL);
if (tag == UNUM_DEFAULT_RULESET) {
rbnf->setDefaultRuleSet(newValue, *status);
@@ -825,14 +825,14 @@
}
const NumberFormat* nf = reinterpret_cast<const NumberFormat*>(fmt);
- const DecimalFormat* df = dynamic_cast<const DecimalFormat*>(nf);
+ const DecimalFormat* df = CR_DYNAMIC_CAST<const DecimalFormat*>(nf);
if (df != NULL) {
if(isPatternLocalized)
df->toLocalizedPattern(pat);
else
df->toPattern(pat);
} else {
- const RuleBasedNumberFormat* rbnf = dynamic_cast<const RuleBasedNumberFormat*>(nf);
+ const RuleBasedNumberFormat* rbnf = CR_DYNAMIC_CAST<const RuleBasedNumberFormat*>(nf);
U_ASSERT(rbnf != NULL);
pat = rbnf->getRules();
}
@@ -854,7 +854,7 @@
return 0;
}
const NumberFormat *nf = reinterpret_cast<const NumberFormat *>(fmt);
- const DecimalFormat *dcf = dynamic_cast<const DecimalFormat *>(nf);
+ const DecimalFormat *dcf = CR_DYNAMIC_CAST<const DecimalFormat *>(nf);
if (dcf == NULL) {
*status = U_UNSUPPORTED_ERROR;
return 0;
@@ -881,7 +881,7 @@
return;
}
NumberFormat *nf = reinterpret_cast<NumberFormat *>(fmt);
- DecimalFormat *dcf = dynamic_cast<DecimalFormat *>(nf);
+ DecimalFormat *dcf = CR_DYNAMIC_CAST<DecimalFormat *>(nf);
if (dcf == NULL) {
*status = U_UNSUPPORTED_ERROR;
return;
@@ -917,7 +917,7 @@
// Verify if the object passed is a DecimalFormat object
NumberFormat* nf = reinterpret_cast<NumberFormat*>(fmt);
- DecimalFormat* df = dynamic_cast<DecimalFormat*>(nf);
+ DecimalFormat* df = CR_DYNAMIC_CAST<DecimalFormat*>(nf);
if (df != NULL) {
if(localized) {
df->applyLocalizedPattern(pat,*parseError, *status);
« no previous file with comments | « third_party/icu/source/i18n/udat.cpp ('k') | third_party/icu/source/i18n/vtzone.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698