From: Simon Marchi <simon.marchi@efficios.com>
To: Tom Tromey <tom@tromey.com>,
Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdb: remove unnecessary call to std::string constructor
Date: Fri, 12 May 2023 14:50:37 -0400 [thread overview]
Message-ID: <62600d29-11cb-2cb4-912d-bd4928a141f7@efficios.com> (raw)
In-Reply-To: <87jzxd2xvk.fsf@tromey.com>
On 5/12/23 14:44, Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
>
> Simon> I spotted this explicit call to std::string, which creates an
> Simon> unnecessary temporary extra std::string, while calling emplace_back.
> Simon> I'm not sure if it has any impact in an optimized build, maybe the
> Simon> compiler elides it. But still, it's unnecessary.
>
> It probably just moves the new string, but I agree it's better with your patch.
Thanks, pushed.
Simon
prev parent reply other threads:[~2023-05-12 18:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 17:33 Simon Marchi
2023-05-12 18:44 ` Tom Tromey
2023-05-12 18:50 ` Simon Marchi [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=62600d29-11cb-2cb4-912d-bd4928a141f7@efficios.com \
--to=simon.marchi@efficios.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).