From e32d4836066565f3eaba7b8fc3f73080e9f26622 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 11 Dec 2003 10:54:38 +0000 Subject: [PATCH] Applied patch [ 857446 ] wxStaticCast evaluates argument twice git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/object.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/wx/object.h b/include/wx/object.h index e4faf7a05b..bc0824541b 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -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)) -- 2.50.0