]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/uobject.cpp
ICU-59131.0.1.tar.gz
[apple/icu.git] / icuSources / common / uobject.cpp
index bf31c573ce27f9b5263423e83f2c0bd5df4093b5..1133dd9b67aaa6586f447eac1c43fcddeb45fb2f 100644 (file)
@@ -1,12 +1,14 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 ******************************************************************************
 *
-*   Copyright (C) 2002-2011, International Business Machines
+*   Copyright (C) 2002-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 ******************************************************************************
 *   file name:  uobject.h
-*   encoding:   US-ASCII
+*   encoding:   UTF-8
 *   tab size:   8 (not used)
 *   indentation:4
 *
@@ -91,23 +93,7 @@ void U_EXPORT2 UMemory::operator delete(void* p, const char* /*file*/, int /*lin
 
 UObject::~UObject() {}
 
-// Future implementation for RTTI that support subtyping. [alan]
-// 
-// UClassID UObject::getStaticClassID() {
-//     return (UClassID) NULL;
-// }
-// 
-// UBool UObject::instanceOf(UClassID type) const {
-//     UClassID c = getDynamicClassID();
-//     for (;;) {
-//         if (c == type) {
-//             return TRUE;
-//         } else if (c == (UClassID) NULL) {
-//             return FALSE;
-//         }
-//         c = * (UClassID*) c;
-//     }
-// }
+UClassID UObject::getDynamicClassID() const { return NULL; }
 
 U_NAMESPACE_END
 
@@ -115,5 +101,5 @@ U_NAMESPACE_USE
 
 U_CAPI void U_EXPORT2
 uprv_deleteUObject(void *obj) {
-    delete reinterpret_cast<UObject *>(obj);
+    delete static_cast<UObject *>(obj);
 }