aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.h
diff options
context:
space:
mode:
authorLancelot SIX <lsix@lancelotsix.com>2021-01-15 19:35:36 +0000
committerLancelot SIX <lsix@lancelotsix.com>2021-01-19 22:49:12 +0000
commit1c3b85ad28085c870f345a341279a869a1560f49 (patch)
tree75cbd2526c801958c773296be299d9ac0906ad14 /gdb/top.h
parenta9a87d3525c2c32c92f0bcfc450ef005fa1f2863 (diff)
downloadbinutils-1c3b85ad28085c870f345a341279a869a1560f49.zip
binutils-1c3b85ad28085c870f345a341279a869a1560f49.tar.gz
binutils-1c3b85ad28085c870f345a341279a869a1560f49.tar.bz2
use DISABLE_COPY_AND_ASSIGN in switch_thru_all_uis
In switch_thru_all_uis, a pre-c++11 way of removing copy constructor and assignment operator is used. This patch uses the DISABLE_COPY_AND_ASSIGN macro which does the right thing for pre and post c++11. gdb/Changelog: 2021-01-19 Lancelot SIX <lsix@lancelotsix.com> * top.h (switch_thru_all_uis): Use DISABLE_COPY_AND_ASSIGN.
Diffstat (limited to 'gdb/top.h')
-rw-r--r--gdb/top.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/top.h b/gdb/top.h
index a31b19a..f58bebb 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -173,6 +173,8 @@ public:
current_ui = ui_list;
}
+ DISABLE_COPY_AND_ASSIGN (switch_thru_all_uis);
+
/* If done iterating, return true; otherwise return false. */
bool done () const
{
@@ -190,11 +192,6 @@ public:
private:
- /* No need for these. They are intentionally not defined
- anywhere. */
- switch_thru_all_uis &operator= (const switch_thru_all_uis &);
- switch_thru_all_uis (const switch_thru_all_uis &);
-
/* Used to iterate through the UIs. */
struct ui *m_iter;