X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd7d06f23d25df834c30d386dcf3b561c4c79a27..f97c985452b20a8c2f0bbfb1d0275298bf09fb45:/samples/memcheck/memcheck.cpp diff --git a/samples/memcheck/memcheck.cpp b/samples/memcheck/memcheck.cpp index 5ccb6165a8..44f024be6b 100644 --- a/samples/memcheck/memcheck.cpp +++ b/samples/memcheck/memcheck.cpp @@ -27,11 +27,13 @@ #include "wx/date.h" -#if !WXDEBUG -#error You must set WXDEBUG to 1 on the 'make' command line or make.env. +#ifdef __WXGTK__ +#include "mondrian.xpm" #endif -// #define new WXDEBUG_NEW +#if !WXDEBUG +#error You must set WXDEBUG to 1 on the 'make' command line (MSW) or with configure (GTK) +#endif // Define a new application type class MyApp: public wxApp @@ -54,14 +56,13 @@ IMPLEMENT_APP(MyApp) bool MyApp::OnInit(void) { // Create the main frame window - MyFrame *frame = new MyFrame(NULL); + MyFrame *frame = new MyFrame((wxFrame *) NULL); // Give it an icon -#ifdef wx_msw +#ifdef __WXMSW__ frame->SetIcon(wxIcon("mondrian")); -#endif -#ifdef wx_x - frame->SetIcon(wxIcon("mondrian.xbm")); +#else + frame->SetIcon(wxIcon(mondrian_xpm)); #endif // Make a menubar @@ -83,10 +84,9 @@ bool MyApp::OnInit(void) wxDebugContext::SetCheckpoint(); wxDebugContext::SetFile("debug.log"); - wxString *thing = new wxString; // WXDEBUG_NEW wxString; + wxString *thing = new wxString; wxDate* date = new wxDate; - // Proves that defining 'new' to be 'WXDEBUG_NEW' doesn't mess up // non-object allocation char *ordinaryNonObject = new char[1000]; @@ -114,7 +114,7 @@ MyFrame::MyFrame(wxFrame *parent): {} // Intercept menu commands -void MyFrame::OnQuit(wxCommandEvent& event) +void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) { Close(TRUE); }