From: Vadim Zeitlin Date: Wed, 9 Dec 2009 14:59:01 +0000 (+0000) Subject: No real changes, just remove __WXDEBUG__ tests. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5ceb93670ce69045f5dcc9bf4599d3942abdd164 No real changes, just remove __WXDEBUG__ tests. These tests are unnecessary now because asserts are almost always enabled. We could test for wxDEBUG_LEVEL but the code still compiles even if it's defined as 0 so there doesn't seem to be any need for it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/except/except.cpp b/samples/except/except.cpp index db66fb76de..f225369234 100644 --- a/samples/except/except.cpp +++ b/samples/except/except.cpp @@ -128,10 +128,8 @@ protected: // catch exceptions which occur in MyFrame methods here virtual bool ProcessEvent(wxEvent& event); -#ifdef __WXDEBUG__ // show how an assert failure message box looks like void OnShowAssert(wxCommandEvent& event); -#endif // __WXDEBUG__ private: // any class wishing to process wxWidgets events must use this macro @@ -186,9 +184,7 @@ enum #if wxUSE_ON_FATAL_EXCEPTION Except_HandleCrash, #endif // wxUSE_ON_FATAL_EXCEPTION -#ifdef __WXDEBUG__ Except_ShowAssert, -#endif // __WXDEBUG__ Except_Dialog, Except_Quit = wxID_EXIT, @@ -214,9 +210,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) #if wxUSE_ON_FATAL_EXCEPTION EVT_MENU(Except_HandleCrash, MyFrame::OnHandleCrash) #endif // wxUSE_ON_FATAL_EXCEPTION -#ifdef __WXDEBUG__ EVT_MENU(Except_ShowAssert, MyFrame::OnShowAssert) -#endif // __WXDEBUG__ END_EVENT_TABLE() BEGIN_EVENT_TABLE(MyDialog, wxDialog) @@ -348,10 +342,8 @@ MyFrame::MyFrame() menuFile->AppendCheckItem(Except_HandleCrash, wxT("&Handle crashes\tCtrl-H")); menuFile->AppendSeparator(); #endif // wxUSE_ON_FATAL_EXCEPTION -#ifdef __WXDEBUG__ menuFile->Append(Except_ShowAssert, wxT("Provoke &assert failure\tCtrl-A")); menuFile->AppendSeparator(); -#endif // __WXDEBUG__ menuFile->Append(Except_Quit, wxT("E&xit\tCtrl-Q"), wxT("Quit this program")); wxMenu *helpMenu = new wxMenu; @@ -444,8 +436,6 @@ void MyFrame::OnHandleCrash(wxCommandEvent& event) #endif // wxUSE_ON_FATAL_EXCEPTION -#ifdef __WXDEBUG__ - void MyFrame::OnShowAssert(wxCommandEvent& WXUNUSED(event)) { // provoke an assert from wxArrayString @@ -453,8 +443,6 @@ void MyFrame::OnShowAssert(wxCommandEvent& WXUNUSED(event)) arr[0]; } -#endif // __WXDEBUG__ - void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { wxString msg;