mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-25 08:54:19 +08:00
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:
committed by
Vadim Zeitlin
parent
33de6dce6f
commit
a059061eb7
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user