]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/dtrule.cpp
ICU-491.11.1.tar.gz
[apple/icu.git] / icuSources / i18n / dtrule.cpp
index 42140249648cecade125fb0e8ea20447eaca9505..c2eeb052a40ce9b882380d069e9dbb7a44859ef6 100644 (file)
@@ -1,10 +1,12 @@
 /*
 *******************************************************************************
-* Copyright (C) 2007, International Business Machines Corporation and         *
-* others. All Rights Reserved.                                                *
+* Copyright (C) 2007-2010, International Business Machines Corporation and
+* others. All Rights Reserved.
 *******************************************************************************
 */
 
+#include <typeinfo>  // 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 &&