X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/95fa881e92cb5284be976d5c7267a03e5fb4c7ab..9a6aafe0039fef580ca1bfcf0e87c1ba8e2953ba:/src/common/init.cpp diff --git a/src/common/init.cpp b/src/common/init.cpp index 49e211f064..2450ec4033 100644 --- a/src/common/init.cpp +++ b/src/common/init.cpp @@ -34,7 +34,7 @@ #include "wx/init.h" #include "wx/thread.h" -#include "wx/ptr_scpd.h" +#include "wx/scopedptr.h" #include "wx/except.h" #if defined(__WXMSW__) && defined(__WXDEBUG__) @@ -63,6 +63,7 @@ public: wxDummyConsoleApp() { } virtual int OnRun() { wxFAIL_MSG( _T("unreachable code") ); return 0; } + virtual bool DoYield(bool, long) { return true; } DECLARE_NO_COPY_CLASS(wxDummyConsoleApp) }; @@ -269,7 +270,7 @@ static bool DoCommonPostInit() } // yes; test if it implements Clone() correctly - wxEvent* test = dynamic_cast(ci->CreateObject()); + wxEvent* test = wxDynamicCast(ci->CreateObject(),wxEvent); if (test == NULL) { wxLogWarning("The event class '%s' should have a DECLARE_DYNAMIC_CLASS macro!", @@ -282,6 +283,7 @@ static bool DoCommonPostInit() wxLogWarning("The event class '%s' does not correctly implement Clone()!", ci->GetClassName()); + delete cloned; delete test; } #endif