Applied patch [ 857446 ] wxStaticCast evaluates argument twice
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -348,12 +348,13 @@ name##PluginSentinel m_pluginsentinel;
|
||||
|
||||
|
||||
#ifdef __WXDEBUG__
|
||||
inline void wxCheckCast(void *ptr)
|
||||
inline void* wxCheckCast(void *ptr)
|
||||
{
|
||||
wxASSERT_MSG( ptr, _T("wxStaticCast() used incorrectly") );
|
||||
return ptr;
|
||||
}
|
||||
#define wxStaticCast(obj, className) \
|
||||
(wxCheckCast(wxDynamicCast(obj, className)), ((className *)(obj)))
|
||||
((className *)wxCheckCast(wxDynamicCast(obj, className)))
|
||||
|
||||
#else // !__WXDEBUG__
|
||||
#define wxStaticCast(obj, className) ((className *)(obj))
|
||||
|
Reference in New Issue
Block a user