From ae688b6468b9b00d109b4a60d51c6e2aeeef2317 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 19 Oct 2004 15:13:11 +0000 Subject: [PATCH] always use wxStaticCast in XRCCTRL (asserts in case of bad use in debug build) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/xrc/xmlres.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/include/wx/xrc/xmlres.h b/include/wx/xrc/xmlres.h index 670373776d..37dc3a18d7 100644 --- a/include/wx/xrc/xmlres.h +++ b/include/wx/xrc/xmlres.h @@ -291,13 +291,8 @@ private: // wxXmlResource::Get()->LoadDialog(&dlg, mainFrame, "my_dialog"); // XRCCTRL(dlg, "my_textctrl", wxTextCtrl)->SetValue(wxT("default value")); -#ifdef __WXDEBUG__ #define XRCCTRL(window, id, type) \ - (wxDynamicCast((window).FindWindow(XRCID(id)), type)) -#else -#define XRCCTRL(window, id, type) \ - ((type*)((window).FindWindow(XRCID(id)))) -#endif + (wxStaticCast((window).FindWindow(XRCID(id)), type)) // wxXmlResourceHandler is an abstract base class for resource handlers // capable of creating a control from an XML node. -- 2.45.2