Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH] gdb: make inferior::terminal a unique ptr
Date: Thu, 25 Jun 2020 14:15:28 -0600	[thread overview]
Message-ID: <87zh8qewbj.fsf@tromey.com> (raw)
In-Reply-To: <20200625155517.32173-1-simon.marchi@efficios.com> (Simon Marchi via Gdb-patches's message of "Thu, 25 Jun 2020 11:55:17 -0400")

>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:

Simon> -    current_inferior ()->terminal = xstrdup (terminal_name);
Simon> +    current_inferior ()->terminal.reset (xstrdup (terminal_name));

You can use make_unique_xstrdup and avoid the call to reset, in favor of
move assignment.

Tom


  parent reply	other threads:[~2020-06-25 20:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-25 15:55 Simon Marchi
2020-06-25 17:18 ` Christian Biesinger
2020-06-25 17:28   ` Pedro Alves
2020-06-25 17:59     ` Luis Machado
2020-06-25 18:09       ` Pedro Alves
2020-06-25 18:39         ` Simon Marchi
2020-06-25 21:20         ` Christian Biesinger
2020-06-25 17:32 ` Pedro Alves
2020-06-25 18:42   ` Simon Marchi
2020-06-25 21:17     ` Pedro Alves
2020-06-25 20:15 ` Tom Tromey [this message]
2020-06-25 21:07   ` Simon Marchi
2020-06-25 21:45     ` Tom Tromey

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=87zh8qewbj.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.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