X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9e96e16fe0bc7af32d329c965ad110a3e5be5ad8..c13d6ac1ea199d1e3908d40d129e2fd5a4d82df7:/src/stc/PlatWX.cpp diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index fbc9ce00a3..c92a71592d 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -86,8 +86,7 @@ Palette::Palette() { Palette::~Palette() { Release(); - delete [] entries; - entries = 0; + wxDELETEA(entries); } void Palette::Release() { @@ -386,7 +385,7 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, dc.DrawRoundedRectangle(wxRectFromPRectangle(rc), cornerSize); return; #else - + #ifdef wxHAS_RAW_BITMAP // TODO: do something with cornerSize @@ -546,7 +545,7 @@ void SurfaceImpl::MeasureWidths(Font &font, const char *s, int len, int *positio #else // If not unicode then just use the widths we have -#if wxUSE_STL +#if wxUSE_STD_CONTAINERS std::copy(tpos.begin(), tpos.end(), positions); #else memcpy(positions, tpos.begin(), len * sizeof(int)); @@ -1144,14 +1143,8 @@ ListBoxImpl::ListBoxImpl() } ListBoxImpl::~ListBoxImpl() { - if (imgList) { - delete imgList; - imgList = NULL; - } - if (imgTypeMap) { - delete imgTypeMap; - imgTypeMap = NULL; - } + wxDELETE(imgList); + wxDELETE(imgTypeMap); } @@ -1329,14 +1322,8 @@ void ListBoxImpl::RegisterImage(int type, const char *xpm_data) { } void ListBoxImpl::ClearRegisteredImages() { - if (imgList) { - delete imgList; - imgList = NULL; - } - if (imgTypeMap) { - delete imgTypeMap; - imgTypeMap = NULL; - } + wxDELETE(imgList); + wxDELETE(imgTypeMap); if (wid) GETLB(wid)->SetImageList(NULL, wxIMAGE_LIST_SMALL); }