From 1229ceb4403315657606f64ef58a3a2d542d469d Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Sun, 17 Feb 2019 23:09:49 -0800 Subject: [PATCH] Remove unnecessary copy ctor/operator= definitions --- include/wx/accel.h | 14 ------ include/wx/aui/auibar.h | 20 -------- include/wx/aui/auibook.h | 6 --- include/wx/aui/framemanager.h | 90 ----------------------------------- include/wx/ribbon/bar.h | 6 --- include/wx/ribbon/buttonbar.h | 7 --- include/wx/ribbon/panel.h | 6 --- include/wx/ribbon/toolbar.h | 6 --- 8 files changed, 155 deletions(-) diff --git a/include/wx/accel.h b/include/wx/accel.h index 98fc2460f7..c1f78d58ed 100644 --- a/include/wx/accel.h +++ b/include/wx/accel.h @@ -55,24 +55,10 @@ public: , m_item(item) { } - wxAcceleratorEntry(const wxAcceleratorEntry& entry) - : m_flags(entry.m_flags) - , m_keyCode(entry.m_keyCode) - , m_command(entry.m_command) - , m_item(entry.m_item) - { } - // create accelerator corresponding to the specified string, return NULL if // string couldn't be parsed or a pointer to be deleted by the caller static wxAcceleratorEntry *Create(const wxString& str); - wxAcceleratorEntry& operator=(const wxAcceleratorEntry& entry) - { - if (&entry != this) - Set(entry.m_flags, entry.m_keyCode, entry.m_command, entry.m_item); - return *this; - } - void Set(int flags, int keyCode, int cmd, wxMenuItem *item = NULL) { m_flags = flags; diff --git a/include/wx/aui/auibar.h b/include/wx/aui/auibar.h index ac5131f274..22b1ea8379 100644 --- a/include/wx/aui/auibar.h +++ b/include/wx/aui/auibar.h @@ -75,15 +75,6 @@ public: m_rect = wxRect(-1,-1, 0, 0); m_toolId = -1; } -#ifndef SWIG - wxAuiToolBarEvent(const wxAuiToolBarEvent& c) : wxNotifyEvent(c) - { - m_isDropdownClicked = c.m_isDropdownClicked; - m_clickPt = c.m_clickPt; - m_rect = c.m_rect; - m_toolId = c.m_toolId; - } -#endif wxEvent *Clone() const wxOVERRIDE { return new wxAuiToolBarEvent(*this); } bool IsDropDownClicked() const { return m_isDropdownClicked; } @@ -132,17 +123,6 @@ public: m_alignment = wxALIGN_CENTER; } - wxAuiToolBarItem(const wxAuiToolBarItem& c) - { - Assign(c); - } - - wxAuiToolBarItem& operator=(const wxAuiToolBarItem& c) - { - Assign(c); - return *this; - } - void Assign(const wxAuiToolBarItem& c) { m_window = c.m_window; diff --git a/include/wx/aui/auibook.h b/include/wx/aui/auibook.h index 578b381874..221d2a4ed2 100644 --- a/include/wx/aui/auibook.h +++ b/include/wx/aui/auibook.h @@ -69,12 +69,6 @@ public: { m_dragSource = NULL; } -#ifndef SWIG - wxAuiNotebookEvent(const wxAuiNotebookEvent& c) : wxBookCtrlEvent(c) - { - m_dragSource = c.m_dragSource; - } -#endif wxEvent *Clone() const wxOVERRIDE { return new wxAuiNotebookEvent(*this); } void SetDragSource(wxAuiNotebook* s) { m_dragSource = s; } diff --git a/include/wx/aui/framemanager.h b/include/wx/aui/framemanager.h index 2e6cf222e3..73c41dc40e 100644 --- a/include/wx/aui/framemanager.h +++ b/include/wx/aui/framemanager.h @@ -168,52 +168,6 @@ public: ~wxAuiPaneInfo() {} -#ifndef SWIG - wxAuiPaneInfo(const wxAuiPaneInfo& c) - { - name = c.name; - caption = c.caption; - icon = c.icon; - window = c.window; - frame = c.frame; - state = c.state; - dock_direction = c.dock_direction; - dock_layer = c.dock_layer; - dock_row = c.dock_row; - dock_pos = c.dock_pos; - best_size = c.best_size; - min_size = c.min_size; - max_size = c.max_size; - floating_pos = c.floating_pos; - floating_size = c.floating_size; - dock_proportion = c.dock_proportion; - buttons = c.buttons; - rect = c.rect; - } - - wxAuiPaneInfo& operator=(const wxAuiPaneInfo& c) - { - name = c.name; - caption = c.caption; - window = c.window; - frame = c.frame; - state = c.state; - dock_direction = c.dock_direction; - dock_layer = c.dock_layer; - dock_row = c.dock_row; - dock_pos = c.dock_pos; - best_size = c.best_size; - min_size = c.min_size; - max_size = c.max_size; - floating_pos = c.floating_pos; - floating_size = c.floating_size; - dock_proportion = c.dock_proportion; - buttons = c.buttons; - rect = c.rect; - return *this; - } -#endif // SWIG - // Write the safe parts of a newly loaded PaneInfo structure "source" into "this" // used on loading perspectives etc. void SafeSet(wxAuiPaneInfo source) @@ -686,17 +640,6 @@ public: canveto_flag = true; dc = NULL; } -#ifndef SWIG - wxAuiManagerEvent(const wxAuiManagerEvent& c) : wxEvent(c) - { - manager = c.manager; - pane = c.pane; - button = c.button; - veto_flag = c.veto_flag; - canveto_flag = c.canveto_flag; - dc = c.dc; - } -#endif wxEvent *Clone() const wxOVERRIDE { return new wxAuiManagerEvent(*this); } void SetManager(wxAuiManager* mgr) { manager = mgr; } @@ -745,39 +688,6 @@ public: reserved1 = false; } -#ifndef SWIG - wxAuiDockInfo(const wxAuiDockInfo& c) - { - dock_direction = c.dock_direction; - dock_layer = c.dock_layer; - dock_row = c.dock_row; - size = c.size; - min_size = c.min_size; - resizable = c.resizable; - fixed = c.fixed; - toolbar = c.toolbar; - panes = c.panes; - rect = c.rect; - reserved1 = c.reserved1; - } - - wxAuiDockInfo& operator=(const wxAuiDockInfo& c) - { - dock_direction = c.dock_direction; - dock_layer = c.dock_layer; - dock_row = c.dock_row; - size = c.size; - min_size = c.min_size; - resizable = c.resizable; - fixed = c.fixed; - toolbar = c.toolbar; - panes = c.panes; - rect = c.rect; - reserved1 = c.reserved1; - return *this; - } -#endif // SWIG - bool IsOk() const { return dock_direction != 0; } bool IsHorizontal() const { return dock_direction == wxAUI_DOCK_TOP || dock_direction == wxAUI_DOCK_BOTTOM; } diff --git a/include/wx/ribbon/bar.h b/include/wx/ribbon/bar.h index 221640504f..78c272a488 100644 --- a/include/wx/ribbon/bar.h +++ b/include/wx/ribbon/bar.h @@ -59,12 +59,6 @@ public: , m_page(page) { } -#ifndef SWIG - wxRibbonBarEvent(const wxRibbonBarEvent& c) : wxNotifyEvent(c) - { - m_page = c.m_page; - } -#endif wxEvent *Clone() const wxOVERRIDE { return new wxRibbonBarEvent(*this); } wxRibbonPage* GetPage() {return m_page;} diff --git a/include/wx/ribbon/buttonbar.h b/include/wx/ribbon/buttonbar.h index 17ba124e57..bc54379261 100644 --- a/include/wx/ribbon/buttonbar.h +++ b/include/wx/ribbon/buttonbar.h @@ -231,13 +231,6 @@ public: , m_bar(bar), m_button(button) { } -#ifndef SWIG - wxRibbonButtonBarEvent(const wxRibbonButtonBarEvent& e) : wxCommandEvent(e) - { - m_bar = e.m_bar; - m_button = e.m_button; - } -#endif wxEvent *Clone() const wxOVERRIDE { return new wxRibbonButtonBarEvent(*this); } wxRibbonButtonBar* GetBar() {return m_bar;} diff --git a/include/wx/ribbon/panel.h b/include/wx/ribbon/panel.h index 6f8a489b41..c47949f81d 100644 --- a/include/wx/ribbon/panel.h +++ b/include/wx/ribbon/panel.h @@ -150,12 +150,6 @@ public: , m_panel(panel) { } -#ifndef SWIG - wxRibbonPanelEvent(const wxRibbonPanelEvent& e) : wxCommandEvent(e) - { - m_panel = e.m_panel; - } -#endif wxEvent *Clone() const wxOVERRIDE { return new wxRibbonPanelEvent(*this); } wxRibbonPanel* GetPanel() {return m_panel;} diff --git a/include/wx/ribbon/toolbar.h b/include/wx/ribbon/toolbar.h index 996927bf5e..cb694194db 100644 --- a/include/wx/ribbon/toolbar.h +++ b/include/wx/ribbon/toolbar.h @@ -207,12 +207,6 @@ public: , m_bar(bar) { } -#ifndef SWIG - wxRibbonToolBarEvent(const wxRibbonToolBarEvent& e) : wxCommandEvent(e) - { - m_bar = e.m_bar; - } -#endif wxEvent *Clone() const wxOVERRIDE { return new wxRibbonToolBarEvent(*this); } wxRibbonToolBar* GetBar() {return m_bar;}