X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f25881804583790351480098b50f4ce1b924e697..cc164686f3dc689732395f11210c5bb9a76b6ff2:/src/xrc/xh_chckb.cpp diff --git a/src/xrc/xh_chckb.cpp b/src/xrc/xh_chckb.cpp index 493c876f5c..35086f42b3 100644 --- a/src/xrc/xh_chckb.cpp +++ b/src/xrc/xh_chckb.cpp @@ -32,10 +32,7 @@ wxCheckBoxXmlHandler::wxCheckBoxXmlHandler() wxObject *wxCheckBoxXmlHandler::DoCreateResource() { - wxCheckBox *control = wxStaticCast(m_instance, wxCheckBox); - - if (!control) - control = new wxCheckBox; + XRC_MAKE_INSTANCE(control, wxCheckBox) control->Create(m_parentAsWindow, GetID(), @@ -45,14 +42,12 @@ wxObject *wxCheckBoxXmlHandler::DoCreateResource() wxDefaultValidator, GetName()); - control->SetValue( GetBool( wxT("checked"))); + control->SetValue(GetBool( wxT("checked"))); SetupWindow(control); return control; } - - bool wxCheckBoxXmlHandler::CanHandle(wxXmlNode *node) { return IsOfClass(node, wxT("wxCheckBox"));