]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/defs.h
added wx_reinterpret_cast() macro
[wxWidgets.git] / include / wx / defs.h
index 460ec94c0b61d7089d44901451cb7d9754b23a7b..56edd148398d2765c55690562ce6fb7ff4d57487 100644 (file)
@@ -270,6 +270,9 @@ typedef int wxWindowID;
     #ifndef HAVE_CONST_CAST
         #define HAVE_CONST_CAST
     #endif
+    #ifndef HAVE_REINTERPRET_CAST
+        #define HAVE_REINTERPRET_CAST
+    #endif
     #ifndef HAVE_STATIC_CAST
         #define HAVE_STATIC_CAST
     #endif
@@ -287,6 +290,12 @@ typedef int wxWindowID;
     #define wx_const_cast(t, x) ((t)(x))
 #endif
 
+#ifdef HAVE_REINTERPRET_CAST
+    #define wx_reinterpret_cast(t, x) reinterpret_cast<t>(x)
+#else
+    #define wx_reinterpret_cast(t, x) ((t)(x))
+#endif
+
 /* for consistency with wxStatic/DynamicCast defined in wx/object.h */
 #define wxConstCast(obj, className) wx_const_cast(className *, obj)