From: Vadim Zeitlin Date: Mon, 4 Aug 2003 11:18:02 +0000 (+0000) Subject: (Open Watcom but not only) compilation warning fixes X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0a3d26b81f22b0269e4b3ab2c2bb1fb60c74fe06 (Open Watcom but not only) compilation warning fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/exec/exec.cpp b/samples/exec/exec.cpp index 13cfdc28e9..d09f94e5c3 100644 --- a/samples/exec/exec.cpp +++ b/samples/exec/exec.cpp @@ -83,7 +83,7 @@ public: // Define an array of process pointers used by MyFrame class MyPipedProcess; -WX_DEFINE_ARRAY(MyPipedProcess *, MyProcessesArray); +WX_DEFINE_ARRAY_NO_PTR(MyPipedProcess *, MyProcessesArray); // Define a new frame type: this is going to be our main frame class MyFrame : public wxFrame diff --git a/samples/regtest/regtest.cpp b/samples/regtest/regtest.cpp index 9e4c080e48..d9fdca92ef 100644 --- a/samples/regtest/regtest.cpp +++ b/samples/regtest/regtest.cpp @@ -104,7 +104,7 @@ private: // structure describing a registry key/value class TreeNode : public wxTreeItemData { - WX_DEFINE_ARRAY(TreeNode *, TreeChildren); + WX_DEFINE_ARRAY_NO_PTR(TreeNode *, TreeChildren); public: RegTreeCtrl *m_pTree; // must be !NULL TreeNode *m_pParent; // NULL only for the root node @@ -1071,7 +1071,7 @@ void RegTreeCtrl::GoTo(const wxString& location) void RegTreeCtrl::DeleteSelected() { long lCurrent = GetSelection(), - lParent = GetParent(lCurrent); + lParent = GetItemParent(lCurrent); if ( lParent == 0 ) { wxLogError(wxT("Can't delete root key.")); diff --git a/samples/sockets/client.cpp b/samples/sockets/client.cpp index 3ba76e9bf2..17781498d8 100644 --- a/samples/sockets/client.cpp +++ b/samples/sockets/client.cpp @@ -571,7 +571,8 @@ void MyFrame::OnTestURL(wxCommandEvent& WXUNUSED(event)) wxYield(); // Get the data - wxFileOutputStream sout( wxT("test.url") ); + wxFile fileTest(wxT("test.url")); + wxFileOutputStream sout(fileTest); if (!sout.Ok()) { m_text->AppendText(_("Error: couldn't open file for output\n")); diff --git a/samples/thread/thread.cpp b/samples/thread/thread.cpp index 1fc119359c..1040e283d0 100644 --- a/samples/thread/thread.cpp +++ b/samples/thread/thread.cpp @@ -39,7 +39,7 @@ #endif class MyThread; -WX_DEFINE_ARRAY(wxThread *, wxArrayThread); +WX_DEFINE_ARRAY_NO_PTR(wxThread *, wxArrayThread); // Define a new application type class MyApp : public wxApp diff --git a/samples/widgets/spinbtn.cpp b/samples/widgets/spinbtn.cpp index 089bfb4fb2..1082559a93 100644 --- a/samples/widgets/spinbtn.cpp +++ b/samples/widgets/spinbtn.cpp @@ -83,10 +83,10 @@ protected: void OnCheckOrRadioBox(wxCommandEvent& event); - void OnSpinBtn(wxCommandEvent& event); - void OnSpinBtnUp(wxCommandEvent& event); - void OnSpinBtnDown(wxCommandEvent& event); - void OnSpinCtrl(wxCommandEvent& event); + void OnSpinBtn(wxSpinEvent& event); + void OnSpinBtnUp(wxSpinEvent& event); + void OnSpinBtnDown(wxSpinEvent& event); + void OnSpinCtrl(wxSpinEvent& event); void OnUpdateUIValueButton(wxUpdateUIEvent& event); void OnUpdateUIMinMaxButton(wxUpdateUIEvent& event); @@ -394,7 +394,7 @@ void SpinBtnWidgetsPage::OnUpdateUICurValueText(wxUpdateUIEvent& event) event.SetText( wxString::Format(_T("%d"), m_spinbtn->GetValue())); } -void SpinBtnWidgetsPage::OnSpinBtn(wxCommandEvent& event) +void SpinBtnWidgetsPage::OnSpinBtn(wxSpinEvent& event) { int value = event.GetInt(); @@ -404,19 +404,19 @@ void SpinBtnWidgetsPage::OnSpinBtn(wxCommandEvent& event) wxLogMessage(_T("Spin button value changed, now %d"), value); } -void SpinBtnWidgetsPage::OnSpinBtnUp(wxCommandEvent& event) +void SpinBtnWidgetsPage::OnSpinBtnUp(wxSpinEvent& event) { wxLogMessage( _T("Spin button value incremented, will be %ld (was %d)"), event.GetInt(), m_spinbtn->GetValue() ); } -void SpinBtnWidgetsPage::OnSpinBtnDown(wxCommandEvent& event) +void SpinBtnWidgetsPage::OnSpinBtnDown(wxSpinEvent& event) { wxLogMessage( _T("Spin button value decremented, will be %ld (was %d)"), event.GetInt(), m_spinbtn->GetValue() ); } -void SpinBtnWidgetsPage::OnSpinCtrl(wxCommandEvent& event) +void SpinBtnWidgetsPage::OnSpinCtrl(wxSpinEvent& event) { if (!m_spinctrl) return; diff --git a/samples/widgets/widgets.cpp b/samples/widgets/widgets.cpp index 494d77bd00..793f15b039 100644 --- a/samples/widgets/widgets.cpp +++ b/samples/widgets/widgets.cpp @@ -164,7 +164,7 @@ private: }; // array of pages -WX_DEFINE_ARRAY(WidgetsPage *, ArrayWidgetsPage); +WX_DEFINE_ARRAY_NO_PTR(WidgetsPage *, ArrayWidgetsPage); // ---------------------------------------------------------------------------- // misc macros