X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5100cabffa34c38db26884577113d01f21cda446..4fdae9972d39fbe62adaa1c1d721ba1762cd8950:/src/msw/ownerdrw.cpp diff --git a/src/msw/ownerdrw.cpp b/src/msw/ownerdrw.cpp index f0f1223260..b23fb671e2 100644 --- a/src/msw/ownerdrw.cpp +++ b/src/msw/ownerdrw.cpp @@ -73,11 +73,7 @@ bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight) wxMemoryDC dc; dc.SetFont(GetFont()); - // ## ugly... - wxChar *szStripped = new wxChar[m_strName.Len()]; - wxStripMenuCodes((wxChar *)m_strName.c_str(), szStripped); - wxString str = szStripped; - delete [] szStripped; + wxString str = wxStripMenuCodes(m_strName); // # without this menu items look too tightly packed (at least under Windows) str += wxT('W'); // 'W' is typically the widest letter