]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 857446 ] wxStaticCast evaluates argument twice
authorJulian Smart <julian@anthemion.co.uk>
Thu, 11 Dec 2003 10:54:38 +0000 (10:54 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 11 Dec 2003 10:54:38 +0000 (10:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/object.h

index e4faf7a05b1f614d49dfdfc3330a34d67cd35c3c..bc0824541b64f78cb6a1086aba691180bd72ecac 100644 (file)
@@ -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))