| Index: third_party/icu/source/test/intltest/icusvtst.cpp
|
| ===================================================================
|
| --- third_party/icu/source/test/intltest/icusvtst.cpp (revision 74230)
|
| +++ third_party/icu/source/test/intltest/icusvtst.cpp (working copy)
|
| @@ -5,7 +5,6 @@
|
| *******************************************************************************
|
| */
|
|
|
| -#include <typeinfo> // for 'typeid' to work
|
|
|
| #include "unicode/utypes.h"
|
|
|
| @@ -85,7 +84,7 @@
|
|
|
| virtual UBool operator==(const UObject& other) const
|
| {
|
| - return typeid(*this) == typeid(other) &&
|
| + return CR_TYPEID(*this) == CR_TYPEID(other) &&
|
| _val == ((Integer&)other)._val;
|
| }
|
|
|
| @@ -117,7 +116,7 @@
|
| virtual ICUServiceFactory* createSimpleFactory(UObject* obj, const UnicodeString& id, UBool visible, UErrorCode& status)
|
| {
|
| Integer* i;
|
| - if (U_SUCCESS(status) && obj && (i = dynamic_cast<Integer*>(obj)) != NULL) {
|
| + if (U_SUCCESS(status) && obj && (i = CR_DYNAMIC_CAST<Integer*>(obj)) != NULL) {
|
| return new SimpleFactory(i, id, visible);
|
| }
|
| return NULL;
|
| @@ -160,11 +159,11 @@
|
| const UnicodeString* s;
|
| const Locale* loc;
|
| const Integer* i;
|
| - if ((s = dynamic_cast<const UnicodeString*>(obj)) != NULL) {
|
| + if ((s = CR_DYNAMIC_CAST<const UnicodeString*>(obj)) != NULL) {
|
| result.append(*s);
|
| - } else if ((loc = dynamic_cast<const Locale*>(obj)) != NULL) {
|
| + } else if ((loc = CR_DYNAMIC_CAST<const Locale*>(obj)) != NULL) {
|
| result.append(loc->getName());
|
| - } else if ((i = dynamic_cast<const Integer*>(obj)) != NULL) {
|
| + } else if ((i = CR_DYNAMIC_CAST<const Integer*>(obj)) != NULL) {
|
| sprintf(buffer, "%d", (int)i->_val);
|
| result.append(buffer);
|
| } else {
|
| @@ -481,7 +480,7 @@
|
| // have to implement cloneInstance. Otherwise we could just tell the service
|
| // what the object type is when we create it, and the default implementation
|
| // could handle everything for us. Phooey.
|
| - if (obj && dynamic_cast<UnicodeString*>(obj) != NULL) {
|
| + if (obj && CR_DYNAMIC_CAST<UnicodeString*>(obj) != NULL) {
|
| return ICUService::createSimpleFactory(obj, id, visible, status);
|
| }
|
| return NULL;
|
| @@ -501,7 +500,7 @@
|
| virtual ICUServiceFactory* createSimpleFactory(UObject* obj, const UnicodeString& id, UBool visible, UErrorCode& /* status */)
|
| {
|
| UnicodeString* s;
|
| - if (obj && (s = dynamic_cast<UnicodeString*>(obj)) != NULL) {
|
| + if (obj && (s = CR_DYNAMIC_CAST<UnicodeString*>(obj)) != NULL) {
|
| return new SimpleFactory(s, id, visible);
|
| }
|
| return NULL;
|
|
|