Index: third_party/icu/source/i18n/translit.cpp |
=================================================================== |
--- third_party/icu/source/i18n/translit.cpp (revision 74230) |
+++ third_party/icu/source/i18n/translit.cpp (working copy) |
@@ -8,7 +8,6 @@ |
********************************************************************** |
*/ |
-#include <typeinfo> // for 'typeid' to work |
#include "unicode/utypes.h" |
@@ -1102,7 +1101,9 @@ |
UnicodeString* idBlock = (UnicodeString*)parser.idBlockVector.elementAt(i); |
if (!idBlock->isEmpty()) { |
Transliterator* temp = createInstance(*idBlock, UTRANS_FORWARD, parseError, status); |
- if (temp != NULL && typeid(*temp) != typeid(NullTransliterator)) |
+ // Chrome: Blind replacement of typeid with CR_TYPEID |
+ // doesn't work here. |
+ if (temp != NULL && CR_TYPEID(*temp) != NullTransliterator::getStaticClassID()) |
transliterators.addElement(temp, status); |
else |
delete temp; |
@@ -1158,7 +1159,7 @@ |
} |
int32_t Transliterator::countElements() const { |
- const CompoundTransliterator* ct = dynamic_cast<const CompoundTransliterator*>(this); |
+ const CompoundTransliterator* ct = CR_DYNAMIC_CAST<const CompoundTransliterator*>(this); |
return ct != NULL ? ct->getCount() : 0; |
} |
@@ -1166,7 +1167,7 @@ |
if (U_FAILURE(ec)) { |
return *this; |
} |
- const CompoundTransliterator* cpd = dynamic_cast<const CompoundTransliterator*>(this); |
+ const CompoundTransliterator* cpd = CR_DYNAMIC_CAST<const CompoundTransliterator*>(this); |
int32_t n = (cpd == NULL) ? 1 : cpd->getCount(); |
if (index < 0 || index >= n) { |
ec = U_INDEX_OUTOFBOUNDS_ERROR; |
@@ -1179,7 +1180,7 @@ |
UnicodeSet& Transliterator::getSourceSet(UnicodeSet& result) const { |
handleGetSourceSet(result); |
if (filter != NULL) { |
- UnicodeSet* filterSet = dynamic_cast<UnicodeSet*>(filter); |
+ UnicodeSet* filterSet = CR_DYNAMIC_CAST<UnicodeSet*>(filter); |
UBool deleteFilterSet = FALSE; |
// Most, but not all filters will be UnicodeSets. Optimize for |
// the high-runner case. |