From: Vadim Zeitlin Date: Mon, 26 Aug 2002 20:58:53 +0000 (+0000) Subject: added extra parentheses to wxDynamicCast() to allow using it like wxDynamicCast(foo... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/768f1af6a29f426b62aa14f854bf4847dc384a7e added extra parentheses to wxDynamicCast() to allow using it like wxDynamicCast(foo, Foo)->DoFoo() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/object.h b/include/wx/object.h index a882a36e6e..8a5f1bb96e 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -303,7 +303,7 @@ name##PluginSentinel m_pluginsentinel; // to be replaced by dynamic_cast<> in the future #define wxDynamicCast(obj, className) \ - (className *) wxCheckDynamicCast((wxObject*)(obj), &className::sm_class##className) + ((className *) wxCheckDynamicCast((wxObject*)(obj), &className::sm_class##className)) // The 'this' pointer is always true, so use this version // to cast the this pointer and avoid compiler warnings.