X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/45bbbc54304272eb25b96e6c63b57107991bcd26..f2cc8cbbbd6fffea122a5f8a6f73ac3f524c7283:/include/wx/object.h 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))