X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d546eba94e77831c41e3370484a41181517bd611..3bb63e5c806e7ef549673822dc6e4d40aa9dbec9:/src/common/appbase.cpp diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index 96eb54acc1..04304f3672 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -33,6 +33,7 @@ #endif // wxUSE_LOG #endif //WX_PRECOMP +#include "wx/utils.h" #include "wx/apptrait.h" #include "wx/cmdline.h" #include "wx/confbase.h" @@ -208,7 +209,7 @@ void wxAppConsole::Exit() wxAppTraits *wxAppConsole::CreateTraits() { - return wxAppTraits::CreateConsole(); + return new wxConsoleAppTraits; } wxAppTraits *wxAppConsole::GetTraits() @@ -261,11 +262,11 @@ void wxAppConsole::ProcessPendingEvents() } // iterate until the list becomes empty - wxNode *node = wxPendingEvents->GetFirst(); + wxList::compatibility_iterator node = wxPendingEvents->GetFirst(); while (node) { wxEvtHandler *handler = (wxEvtHandler *)node->GetData(); - delete node; + wxPendingEvents->Erase(node); // In ProcessPendingEvents(), new handlers might be add // and we can safely leave the critical section here. @@ -546,11 +547,6 @@ bool wxAppTraitsBase::ShowAssertDialog(const wxString& msg) #endif // __WXDEBUG__ -wxAppTraits *wxAppTraitsBase::CreateConsole() -{ - return new wxConsoleAppTraits; -} - // ============================================================================ // global functions implementation // ============================================================================ @@ -758,7 +754,7 @@ void ShowAssertDialog(const wxChar *szFile, if ( !s_bNoAsserts ) { // send it to the normal log destination - wxLogDebug(_T("%s"), msg); + wxLogDebug(_T("%s"), msg.c_str()); if ( traits ) {