X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/55d99c7a77789ff4904bf96eddca3715eb5af9b9..fd938b117780571129a03155ea0dc01fc73b7f23:/src/common/statbar.cpp?ds=inline diff --git a/src/common/statbar.cpp b/src/common/statbar.cpp index 6780e01309..3867476a71 100644 --- a/src/common/statbar.cpp +++ b/src/common/statbar.cpp @@ -234,7 +234,8 @@ void wxStatusBarBase::FreeStacks() { if(m_statusTextStacks[i]) { - m_statusTextStacks[i]->Clear(); + wxListString& t = *m_statusTextStacks[i]; + WX_CLEAR_LIST(wxListString, t); delete m_statusTextStacks[i]; } } @@ -257,10 +258,11 @@ void wxStatusBarBase::PopStatusText(int number) { wxListString *st = GetStatusStack(number); wxCHECK_RET( st, _T("Unbalanced PushStatusText/PopStatusText") ); - wxListString::Node *top = st->GetFirst(); + wxListString::compatibility_iterator top = st->GetFirst(); SetStatusText(*top->GetData(), number); - st->DeleteNode(top); + delete top->GetData(); + st->Erase(top); if(st->GetCount() == 0) { delete st; @@ -288,7 +290,6 @@ wxListString *wxStatusBarBase::GetOrCreateStatusStack(int i) if(!m_statusTextStacks[i]) { m_statusTextStacks[i] = new wxListString(); - m_statusTextStacks[i]->DeleteContents(TRUE); } return m_statusTextStacks[i];