X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f25881804583790351480098b50f4ce1b924e697..b1633d20d6f06a0b5a77d5208c0beddf19324f33:/src/xrc/xh_chckb.cpp?ds=inline 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"));