From: Simon Marchi <simon.marchi@polymtl.ca>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA 1/3] Rename _const functions to use overloading instead
Date: Mon, 11 Sep 2017 19:16:00 -0000 [thread overview]
Message-ID: <4b0162170770e53193e90e681161aff7@polymtl.ca> (raw)
In-Reply-To: <20170911003325.3765-2-tom@tromey.com>
On 2017-09-11 02:33, Tom Tromey wrote:
> This renames a few functions -- skip_spaces_const,
> skip_to_space_const, get_number_const, extract_arg_const -- to drop
> the "_const" suffix and instead rely on overloading.
>
> This makes future const fixes simpler by reducing the number of lines
> that must be changed. I think it is also not any less clear, as all
> these functions have the same interface as their non-const versions by
> design. Furthermore there's an example of using an overload in-tree
> already, namely check_for_argument.
>
> This patch was largely created using some perl one-liners; then a few
> fixes were applied by hand.
LGTM. That was on my mind as well, glad you did it!
Simon
prev parent reply other threads:[~2017-09-11 19:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-11 0:33 [RFA 0/3] preparation for command constification; cleanup removal Tom Tromey
2017-09-11 0:33 ` [RFA 3/3] Make extract_arg return a std::string Tom Tromey
2017-09-11 19:52 ` Simon Marchi
2017-09-11 21:43 ` Tom Tromey
2017-09-11 0:33 ` [RFA 2/3] Constify language_enum Tom Tromey
2017-09-11 19:17 ` Simon Marchi
2017-09-11 0:33 ` [RFA 1/3] Rename _const functions to use overloading instead Tom Tromey
2017-09-11 19:16 ` 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=4b0162170770e53193e90e681161aff7@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--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