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

@ -157,6 +157,8 @@ class MyFrame : public wxFrame
{
public:
MyFrame();
MyFrame(const MyFrame&) = delete;
MyFrame& operator=(const MyFrame&) = delete;
private:
void OnListLoadedDLLs(wxCommandEvent& event);
@ -185,7 +187,6 @@ private:
// number of lines drawn in OnPaint()
int m_numLines;
wxDECLARE_NO_COPY_CLASS(MyFrame);
wxDECLARE_EVENT_TABLE();
};
@ -202,6 +203,8 @@ class MyApp : public wxApp
public:
// call wxHandleFatalExceptions here
MyApp();
MyApp(const MyApp&) = delete;
MyApp& operator=(const MyApp&) = delete;
// create our main window here
virtual bool OnInit() override;
@ -219,8 +222,6 @@ public:
private:
bool m_uploadReport;
wxDECLARE_NO_COPY_CLASS(MyApp);
};
wxIMPLEMENT_APP(MyApp);