Replace wxDECLARE_NO_COPY_CLASS with deleted functions in samples

Use standard C++11 way of making classes non-copyable instead of
wx-specific macro.

Closes #24150.
This commit is contained in:
Blake-Madden 2023-12-20 11:23:59 -05:00 committed by Vadim Zeitlin
parent 33de6dce6f
commit a059061eb7
20 changed files with 78 additions and 56 deletions

View file

@ -20,11 +20,10 @@ class MyApp: public wxApp
{
public:
MyApp() { }
MyApp(const MyApp&) = delete;
MyApp& operator=(const MyApp&) = delete;
virtual bool OnInit() override;
private:
wxDECLARE_NO_COPY_CLASS(MyApp);
};
class MyListCtrl: public wxListCtrl
@ -40,6 +39,8 @@ public:
m_updated = -1;
}
MyListCtrl(const MyListCtrl&) = delete;
MyListCtrl &operator=(const MyListCtrl&) = delete;
// add one item to the listctrl in report mode
void InsertItemInReportView(int i);
@ -90,7 +91,6 @@ private:
// checked boxes in virtual list
wxSelectionStore m_checked;
wxDECLARE_NO_COPY_CLASS(MyListCtrl);
wxDECLARE_EVENT_TABLE();
};
@ -99,6 +99,9 @@ class MyFrame: public wxFrame
{
public:
MyFrame(const wxString& title);
MyFrame(const MyFrame&) = delete;
MyFrame &operator=(const MyFrame&) = delete;
virtual ~MyFrame();
protected:
@ -185,8 +188,6 @@ private:
// number of items to initialize list/report view with
int m_numListItems;
wxDECLARE_NO_COPY_CLASS(MyFrame);
wxDECLARE_EVENT_TABLE();
};