]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/currunit.cpp
ICU-511.25.tar.gz
[apple/icu.git] / icuSources / i18n / currunit.cpp
index 0ba2631d480cd850f1838fbda385064db3bbd261..870d9d0c4ce8bb6f60500e9ac7ce9960ebd3f036 100644 (file)
@@ -1,6 +1,6 @@
 /*
 **********************************************************************
-* Copyright (c) 2004, International Business Machines
+* Copyright (c) 2004-2012, International Business Machines
 * Corporation and others.  All Rights Reserved.
 **********************************************************************
 * Author: Alan Liu
@@ -8,6 +8,8 @@
 * Since: ICU 3.0
 **********************************************************************
 */
+#include "utypeinfo.h"  // for 'typeid' to work
+
 #include "unicode/utypes.h"
 
 #if !UCONFIG_NO_FORMATTING
@@ -49,7 +51,7 @@ CurrencyUnit::~CurrencyUnit() {
     
 UBool CurrencyUnit::operator==(const UObject& other) const {
     const CurrencyUnit& c = (const CurrencyUnit&) other;
-    return other.getDynamicClassID() == CurrencyUnit::getStaticClassID() &&
+    return typeid(*this) == typeid(other) &&
         u_strcmp(isoCode, c.isoCode) == 0;    
 }