]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/uchriter.cpp
ICU-461.12.tar.gz
[apple/icu.git] / icuSources / common / uchriter.cpp
index 2573baa9902ea135715552d2e8ea894a9681fd73..f2878815e4f003fc168ebbe5e98bb3885e870186 100644 (file)
@@ -1,17 +1,19 @@
 /*
 ******************************************************************************
-* Copyright (C) 1998-2001, International Business Machines Corporation and   *
-* others. All Rights Reserved.                                               *
+* Copyright (C) 1998-2010, International Business Machines Corporation and
+* others. All Rights Reserved.
 ******************************************************************************
 */
 
+#include <typeinfo>  // for 'typeid' to work
+
 #include "unicode/uchriter.h"
 #include "unicode/ustring.h"
 #include "uhash.h"
 
 U_NAMESPACE_BEGIN
 
-const char UCharCharacterIterator::fgClassID = 0;
+UOBJECT_DEFINE_RTTI_IMPLEMENTATION(UCharCharacterIterator)
 
 UCharCharacterIterator::UCharCharacterIterator()
   : CharacterIterator(),
@@ -66,8 +68,7 @@ UCharCharacterIterator::operator==(const ForwardCharacterIterator& that) const {
     if (this == &that) {
         return TRUE;
     }
-    
-    if (getDynamicClassID() != that.getDynamicClassID()) {
+    if (typeid(*this) != typeid(that)) {
         return FALSE;
     }