From c71963cdbeb3b801cbce75830922dfa05c5ee721 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 26 Jul 2003 17:34:12 +0000 Subject: [PATCH] VC++ warning fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/listctrl/listtest.cpp | 19 +++++++++++-------- samples/listctrl/listtest.h | 7 +++++++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index fed6bae9f8..2f43870e21 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -114,11 +114,14 @@ static const int NUM_ITEMS = 30; // number of items in icon/small icon view static const int NUM_ICONS = 9; -int wxCALLBACK MyCompareFunction(long item1, long item2, long sortData) +int wxCALLBACK MyCompareFunction(long item1, long item2, long WXUNUSED(sortData)) { // inverse the order - if (item1 < item2) return -1; - if (item1 > item2) return 1; + if (item1 < item2) + return -1; + if (item1 > item2) + return 1; + return 0; } @@ -271,14 +274,14 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) dialog.ShowModal(); } -void MyFrame::OnFreeze(wxCommandEvent& event) +void MyFrame::OnFreeze(wxCommandEvent& WXUNUSED(event)) { wxLogMessage(_T("Freezing the control")); m_listCtrl->Freeze(); } -void MyFrame::OnThaw(wxCommandEvent& event) +void MyFrame::OnThaw(wxCommandEvent& WXUNUSED(event)) { wxLogMessage(_T("Thawing the control")); @@ -512,7 +515,7 @@ void MyFrame::OnSort(wxCommandEvent& WXUNUSED(event)) sw.Time())); } -void MyFrame::OnShowSelInfo(wxCommandEvent& event) +void MyFrame::OnShowSelInfo(wxCommandEvent& WXUNUSED(event)) { int selCount = m_listCtrl->GetSelectedItemCount(); wxLogMessage(_T("%d items selected:"), selCount); @@ -538,7 +541,7 @@ void MyFrame::OnShowSelInfo(wxCommandEvent& event) } } -void MyFrame::OnShowColInfo(wxCommandEvent& event) +void MyFrame::OnShowColInfo(wxCommandEvent& WXUNUSED(event)) { int count = m_listCtrl->GetColumnCount(); wxLogMessage(wxT("%d columns:"), count); @@ -906,7 +909,7 @@ wxString MyListCtrl::OnGetItemText(long item, long column) const return wxString::Format(_T("Column %ld of item %ld"), column, item); } -int MyListCtrl::OnGetItemImage(long item) const +int MyListCtrl::OnGetItemImage(long WXUNUSED(item)) const { return 0; } diff --git a/samples/listctrl/listtest.h b/samples/listctrl/listtest.h index db6eb7cfcf..0fafad7b75 100644 --- a/samples/listctrl/listtest.h +++ b/samples/listctrl/listtest.h @@ -13,7 +13,12 @@ class MyApp: public wxApp { public: + MyApp() { } + virtual bool OnInit(); + +private: + DECLARE_NO_COPY_CLASS(MyApp) }; class MyListCtrl: public wxListCtrl @@ -66,6 +71,7 @@ private: wxListItemAttr m_attr; + DECLARE_NO_COPY_CLASS(MyListCtrl) DECLARE_EVENT_TABLE() }; @@ -127,6 +133,7 @@ private: wxLog *m_logOld; + DECLARE_NO_COPY_CLASS(MyFrame) DECLARE_EVENT_TABLE() }; -- 2.45.2