X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd47af27e12ee66b3e9eed6f1711e516f36dc837..ec439571cb9a59dd3354e601a90ded95019f13a9:/src/xrc/xh_chckl.cpp diff --git a/src/xrc/xh_chckl.cpp b/src/xrc/xh_chckl.cpp index f4e354ec5e..e13a117b5a 100644 --- a/src/xrc/xh_chckl.cpp +++ b/src/xrc/xh_chckl.cpp @@ -57,29 +57,21 @@ wxObject *wxCheckListBoxXmlHandler::DoCreateResource() // need to build the list of strings from children m_insideBox = true; CreateChildrenPrivately(NULL, GetParamNode(wxT("content"))); - wxString *strings = (wxString *) NULL; - if (strList.GetCount() > 0) - { - strings = new wxString[strList.GetCount()]; - int count = strList.GetCount(); - for(int i = 0; i < count; i++) - strings[i] = strList[i]; - } XRC_MAKE_INSTANCE(control, wxCheckListBox) control->Create(m_parentAsWindow, GetID(), GetPosition(), GetSize(), - strList.GetCount(), - strings, + strList, GetStyle(), wxDefaultValidator, GetName()); // step through children myself (again.) wxXmlNode *n = GetParamNode(wxT("content")); - if (n) n = n->GetChildren(); + if (n) + n = n->GetChildren(); int i = 0; while (n) { @@ -99,8 +91,6 @@ wxObject *wxCheckListBoxXmlHandler::DoCreateResource() SetupWindow(control); - if (strings != NULL) - delete[] strings; strList.Clear(); // dump the strings return control;