From: Włodzimierz Skiba Date: Wed, 30 Mar 2005 19:10:46 +0000 (+0000) Subject: Wrong #pragma interface/implementation warning fixes. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/11fdee427ee7c2aae0fda8655b30791f084a45ab Wrong #pragma interface/implementation warning fixes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/dialup/nettest.cpp b/samples/dialup/nettest.cpp index 13b4006fe5..4b15fea0af 100644 --- a/samples/dialup/nettest.cpp +++ b/samples/dialup/nettest.cpp @@ -18,8 +18,8 @@ // ---------------------------------------------------------------------------- #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "nettest.cpp" - #pragma interface "nettest.cpp" + #pragma implementation + #pragma interface #endif // For compilers that support precompilation, includes "wx/wx.h". diff --git a/samples/drawing/drawing.cpp b/samples/drawing/drawing.cpp index 8e3c8734a9..38ae2301d5 100644 --- a/samples/drawing/drawing.cpp +++ b/samples/drawing/drawing.cpp @@ -18,8 +18,8 @@ // ---------------------------------------------------------------------------- #if defined(__GNUG__) && !defined(__APPLE__) - #pragma implementation "drawing.cpp" - #pragma interface "drawing.cpp" + #pragma implementation + #pragma interface #endif // For compilers that support precompilation, includes "wx/wx.h". @@ -523,7 +523,7 @@ void MyCanvas::DrawDefault(wxDC& dc) dc.GetPixel(1,1, &tmpColour); dc.FloodFill(1,1, tmpColour, wxFLOOD_SURFACE); #endif - + dc.DrawCheckMark(5, 80, 15, 15); dc.DrawCheckMark(25, 80, 30, 30); dc.DrawCheckMark(60, 80, 60, 60); diff --git a/samples/dynamic/dynamic.cpp b/samples/dynamic/dynamic.cpp index 55b3b400a7..6e803e0eba 100644 --- a/samples/dynamic/dynamic.cpp +++ b/samples/dynamic/dynamic.cpp @@ -10,8 +10,8 @@ ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(__APPLE__) -#pragma implementation "dynamic.cpp" -#pragma interface "dynamic.cpp" +#pragma implementation +#pragma interface #endif // For compilers that support precompilation, includes "wx/wx.h". @@ -60,9 +60,9 @@ bool MyApp::OnInit(void) MyFrame *frame = new MyFrame(NULL, _T("Dynamic wxWidgets App"), 50, 50, 450, 340); // You used to have to do some casting for param 4, but now there are type-safe handlers - frame->Connect( DYNAMIC_QUIT, wxID_ANY, + frame->Connect( DYNAMIC_QUIT, wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MyFrame::OnQuit) ); - frame->Connect( DYNAMIC_ABOUT, wxID_ANY, + frame->Connect( DYNAMIC_ABOUT, wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MyFrame::OnAbout) ); // Give it an icon diff --git a/samples/erase/erase.cpp b/samples/erase/erase.cpp index 8a00632083..f3b752b666 100644 --- a/samples/erase/erase.cpp +++ b/samples/erase/erase.cpp @@ -18,8 +18,8 @@ // ---------------------------------------------------------------------------- #if defined(__GNUG__) && !defined(__APPLE__) - #pragma implementation "erase.cpp" - #pragma interface "erase.cpp" + #pragma implementation + #pragma interface #endif // For compilers that support precompilation, includes "wx/wx.h". @@ -213,7 +213,7 @@ MyCanvas::MyCanvas( wxFrame *parent ) m_bitmap = wxBitmap( wxICON(mondrian) ); new wxStaticBitmap( this, wxID_ANY, m_bitmap, wxPoint(80,20) ); - + SetFocusIgnoringChildren(); } @@ -341,7 +341,7 @@ void MyCanvas::OnEraseBackground( wxEraseEvent& event ) dc.SetPen(*wxGREEN_PEN); PrepareDC( dc ); - + // clear any junk currently displayed dc.Clear(); diff --git a/samples/exec/exec.cpp b/samples/exec/exec.cpp index 0a08de9af5..5ecdb7744d 100644 --- a/samples/exec/exec.cpp +++ b/samples/exec/exec.cpp @@ -18,8 +18,8 @@ // ---------------------------------------------------------------------------- #if defined(__GNUG__) && !defined(__APPLE__) - #pragma implementation "exec.cpp" - #pragma interface "exec.cpp" + #pragma implementation + #pragma interface #endif // For compilers that support precompilation, includes "wx/wx.h". @@ -1028,7 +1028,7 @@ void MyPipedProcess::OnTerminate(int pid, int status) bool MyPipedProcess2::HasInput() { - if ( !!m_input ) + if ( !m_input.empty() ) { wxTextOutputStream os(*GetOutputStream()); os.WriteString(m_input); diff --git a/samples/html/help/help.cpp b/samples/html/help/help.cpp index d54817fab5..301cb0f7dd 100644 --- a/samples/html/help/help.cpp +++ b/samples/html/help/help.cpp @@ -4,8 +4,8 @@ ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(__APPLE__) - #pragma implementation "help.cpp" - #pragma interface "help.cpp" + #pragma implementation + #pragma interface #endif // For compilers that support precompilation, includes "wx/wx.h". @@ -60,7 +60,7 @@ void OnClose(wxCloseEvent& event); private: wxHtmlHelpController help; - + // any class wishing to process wxWidgets events must use this macro DECLARE_EVENT_TABLE() }; @@ -108,11 +108,11 @@ bool MyApp::OnInit() { wxInitAllImageHandlers(); -#if wxUSE_STREAMS && wxUSE_ZIPSTREAM && wxUSE_ZLIB +#if wxUSE_STREAMS && wxUSE_ZIPSTREAM && wxUSE_ZLIB wxFileSystem::AddHandler(new wxZipFSHandler); #endif SetVendorName(wxT("wxWidgets")); - SetAppName(wxT("wxHTMLHelp")); + SetAppName(wxT("wxHTMLHelp")); // Create the main application window MyFrame *frame = new MyFrame(_("HTML Help Sample"), @@ -137,7 +137,7 @@ // frame constructor MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) - : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size), + : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size), help(wxHF_DEFAULT_STYLE | wxHF_OPEN_FILES) { // create a menu bar @@ -185,7 +185,7 @@ if ( help.GetFrame() ) // returns NULL if no help frame active help.GetFrame()->Close(true); // now we can safely delete the config pointer - event.Skip(); + event.Skip(); delete wxConfig::Set(NULL); } diff --git a/samples/html/test/test.cpp b/samples/html/test/test.cpp index b5f9c117bc..6bde933e55 100644 --- a/samples/html/test/test.cpp +++ b/samples/html/test/test.cpp @@ -9,8 +9,8 @@ ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(__APPLE__) - #pragma implementation "test.cpp" - #pragma interface "test.cpp" + #pragma implementation + #pragma interface #endif // For compilers that support precompilation, includes "wx/wx.h". @@ -191,7 +191,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) SetMenuBar(menuBar); SetIcon(wxIcon(sample_xpm)); - + #if wxUSE_ACCEL // Create convenient accelerators for Back and Forward navigation wxAcceleratorEntry entries[2]; diff --git a/samples/mobile/styles/styles.cpp b/samples/mobile/styles/styles.cpp index ddef0c19e6..944822bc77 100644 --- a/samples/mobile/styles/styles.cpp +++ b/samples/mobile/styles/styles.cpp @@ -6,7 +6,7 @@ ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ - #pragma implementation "styles.cpp" + #pragma implementation "styles.h" #endif // For compilers that support precompilation diff --git a/samples/mobile/styles/styles.h b/samples/mobile/styles/styles.h index d4629f6e88..078423813a 100644 --- a/samples/mobile/styles/styles.h +++ b/samples/mobile/styles/styles.h @@ -8,7 +8,7 @@ #define __styles_H__ #if defined(__GNUG__) && !defined(__APPLE__) - #pragma interface "styles.cpp" + #pragma interface "styles.h" #endif // Include wxWidgets' headers diff --git a/samples/mobile/wxedit/wxedit.cpp b/samples/mobile/wxedit/wxedit.cpp index 87676f4571..49b826f480 100644 --- a/samples/mobile/wxedit/wxedit.cpp +++ b/samples/mobile/wxedit/wxedit.cpp @@ -6,7 +6,7 @@ ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ - #pragma implementation "wxedit.cpp" + #pragma implementation "wxedit.h" #endif // For compilers that support precompilation diff --git a/samples/mobile/wxedit/wxedit.h b/samples/mobile/wxedit/wxedit.h index 6b412e61dd..66b1d41d2e 100644 --- a/samples/mobile/wxedit/wxedit.h +++ b/samples/mobile/wxedit/wxedit.h @@ -8,7 +8,7 @@ #define __wxedit_H__ #if defined(__GNUG__) && !defined(__APPLE__) - #pragma interface "wxedit.cpp" + #pragma interface "wxedit.h" #endif // Include wxWidgets' headers diff --git a/samples/propsize/propsize.cpp b/samples/propsize/propsize.cpp index c217cba597..2cf73c7018 100644 --- a/samples/propsize/propsize.cpp +++ b/samples/propsize/propsize.cpp @@ -17,8 +17,8 @@ // headers // ---------------------------------------------------------------------------- #if defined(__GNUG__) && !defined(__APPLE__) - #pragma implementation "propsize.cpp" - #pragma interface "propsize.cpp" + #pragma implementation + #pragma interface #endif // For compilers that support precompilation, includes "wx/wx.h". diff --git a/samples/shaped/shaped.cpp b/samples/shaped/shaped.cpp index 5ade1330a7..d91d53cb12 100644 --- a/samples/shaped/shaped.cpp +++ b/samples/shaped/shaped.cpp @@ -18,8 +18,8 @@ // ---------------------------------------------------------------------------- #if defined(__GNUG__) && !defined(__APPLE__) - #pragma implementation "shaped.cpp" - #pragma interface "shaped.cpp" + #pragma implementation + #pragma interface #endif // For compilers that support precompilation, includes "wx/wx.h". diff --git a/samples/sockets/client.cpp b/samples/sockets/client.cpp index 33993489aa..c7c4e9da75 100644 --- a/samples/sockets/client.cpp +++ b/samples/sockets/client.cpp @@ -18,8 +18,8 @@ // -------------------------------------------------------------------------- #if defined(__GNUG__) && !defined(__APPLE__) -# pragma implementation "client.cpp" -# pragma interface "client.cpp" + #pragma implementation + #pragma interface #endif // For compilers that support precompilation, includes "wx/wx.h". diff --git a/samples/sockets/server.cpp b/samples/sockets/server.cpp index 4904c662fc..fab500e48d 100644 --- a/samples/sockets/server.cpp +++ b/samples/sockets/server.cpp @@ -18,8 +18,8 @@ // -------------------------------------------------------------------------- #if defined(__GNUG__) && !defined(__APPLE__) -# pragma implementation "server.cpp" -# pragma interface "server.cpp" + #pragma implementation + #pragma interface #endif // For compilers that support precompilation, includes "wx/wx.h".