]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/tztrans.cpp
ICU-461.18.tar.gz
[apple/icu.git] / icuSources / i18n / tztrans.cpp
index 32e6ff7ffb90219e2827ff54fa65407cc5d03aa3..f795e4092888a91287139c2f8041fd8702f8d979 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
@@ -64,16 +66,16 @@ TimeZoneTransition::operator==(const TimeZoneTransition& that) const {
     if (this == &that) {
         return TRUE;
     }
-    if (getDynamicClassID() != that.getDynamicClassID()) {
+    if (typeid(*this) != typeid(that)) {
         return FALSE;
     }
     if (fTime != that.fTime) {
         return FALSE;
     }
-    if (fFrom == NULL && that.fFrom == NULL
-        || fFrom != NULL && that.fFrom != NULL && *fFrom == *(that.fFrom)) {
-        if (fTo == NULL && that.fTo == NULL
-            || fTo != NULL && that.fTo != NULL && *fTo == *(that.fTo)) {
+    if ((fFrom == NULL && that.fFrom == NULL)
+        || (fFrom != NULL && that.fFrom != NULL && *fFrom == *(that.fFrom))) {
+        if ((fTo == NULL && that.fTo == NULL)
+            || (fTo != NULL && that.fTo != NULL && *fTo == *(that.fTo))) {
             return TRUE;
         }
     }