X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/95fa881e92cb5284be976d5c7267a03e5fb4c7ab..8b93348e82c0906364ef2e020fd1adaaa49f519f:/src/common/init.cpp?ds=sidebyside diff --git a/src/common/init.cpp b/src/common/init.cpp index 49e211f064..0e76cc4aba 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,8 +63,9 @@ public: wxDummyConsoleApp() { } virtual int OnRun() { wxFAIL_MSG( _T("unreachable code") ); return 0; } + virtual bool DoYield(bool, long) { return true; } - DECLARE_NO_COPY_CLASS(wxDummyConsoleApp) + wxDECLARE_NO_COPY_CLASS(wxDummyConsoleApp); }; // we need a special kind of auto pointer to wxApp which not only deletes the @@ -93,7 +94,7 @@ public: wxApp::SetInstance(ptr); } - DECLARE_NO_COPY_CLASS(wxAppPtr) + wxDECLARE_NO_COPY_CLASS(wxAppPtr); }; // class to ensure that wxAppBase::CleanUp() is called if our Initialize() @@ -160,7 +161,7 @@ static struct InitData wchar_t **argv; #endif // wxUSE_UNICODE - DECLARE_NO_COPY_CLASS(InitData) + wxDECLARE_NO_COPY_CLASS(InitData); } gs_initData; // ============================================================================ @@ -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