added wx_reinterpret_cast() macro

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29510 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-09-28 21:44:10 +00:00
parent b41f29c357
commit 8c8d66c5f0
2 changed files with 27 additions and 2 deletions

View 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)