From: Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Cc: Lancelot SIX <lsix@lancelotsix.com>
Subject: [PATCH] use DISABLE_COPY_AND_ASSIGN in switch_thru_all_uis
Date: Fri, 15 Jan 2021 19:49:50 +0000 [thread overview]
Message-ID: <20210115194950.16882-1-lsix@lancelotsix.com> (raw)
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:
* top.h (switch_thru_all_uis): Use DISABLE_COPY_AND_ASSIGN.
---
gdb/top.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/gdb/top.h b/gdb/top.h
index a31b19ae954..d912ea97190 100644
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -190,10 +190,7 @@ class switch_thru_all_uis
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 &);
+ DISABLE_COPY_AND_ASSIGN (switch_thru_all_uis);
/* Used to iterate through the UIs. */
struct ui *m_iter;
--
2.29.2
next reply other threads:[~2021-01-15 19:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 19:49 Lancelot SIX via Gdb-patches [this message]
2021-01-15 20:09 ` Simon Marchi via Gdb-patches
2021-01-15 21:28 ` [PATCH v2] " Lancelot SIX via Gdb-patches
2021-01-15 21:38 ` Simon Marchi via Gdb-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210115194950.16882-1-lsix@lancelotsix.com \
--to=gdb-patches@sourceware.org \
--cc=lsix@lancelotsix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox