]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/dtrule.cpp
ICU-57166.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / dtrule.cpp
index 42140249648cecade125fb0e8ea20447eaca9505..b8fd30ea9734303d90201d9c019c7f047ac0a4cf 100644 (file)
@@ -1,10 +1,12 @@
 /*
 *******************************************************************************
-* Copyright (C) 2007, International Business Machines Corporation and         *
-* others. All Rights Reserved.                                                *
+* Copyright (C) 2007-2012, International Business Machines Corporation and
+* others. All Rights Reserved.
 *******************************************************************************
 */
 
+#include "utypeinfo.h"  // for 'typeid' to work
+
 #include "unicode/utypes.h"
 
 #if !UCONFIG_NO_FORMATTING
@@ -80,7 +82,7 @@ DateTimeRule::operator=(const DateTimeRule& right) {
 UBool
 DateTimeRule::operator==(const DateTimeRule& that) const {
     return ((this == &that) ||
-            (getDynamicClassID() == that.getDynamicClassID() &&
+            (typeid(*this) == typeid(that) &&
             fMonth == that.fMonth &&
             fDayOfMonth == that.fDayOfMonth &&
             fDayOfWeek == that.fDayOfWeek &&