Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
To: Lancelot SIX <lsix@lancelotsix.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] use DISABLE_COPY_AND_ASSIGN in switch_thru_all_uis
Date: Fri, 15 Jan 2021 16:38:02 -0500	[thread overview]
Message-ID: <a5edd2c5-5173-07e6-3f30-32a1ab441924@polymtl.ca> (raw)
In-Reply-To: <20210115212842.24317-1-lsix@lancelotsix.com>



On 2021-01-15 4:28 p.m., Lancelot SIX via Gdb-patches wrote:
> 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 | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/gdb/top.h b/gdb/top.h
> index a31b19ae954..f58bebbb385 100644
> --- a/gdb/top.h
> +++ b/gdb/top.h
> @@ -173,6 +173,8 @@ class switch_thru_all_uis
>      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 @@ 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 &);
> -
>    /* Used to iterate through the UIs.  */
>    struct ui *m_iter;
>  
> 

Thanks, this is ok.

Simon

      reply	other threads:[~2021-01-15 21:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15 19:49 [PATCH] " Lancelot SIX via Gdb-patches
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 [this message]

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=a5edd2c5-5173-07e6-3f30-32a1ab441924@polymtl.ca \
    --to=gdb-patches@sourceware.org \
    --cc=lsix@lancelotsix.com \
    --cc=simon.marchi@polymtl.ca \
    /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