From: Simon Marchi <simon.marchi@polymtl.ca>
To: Pedro Alves <palves@redhat.com>
Cc: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Use std::vector for symtab_fns
Date: Wed, 11 Oct 2017 13:36:00 -0000 [thread overview]
Message-ID: <063e6faa390b1477d649167cecee2b97@polymtl.ca> (raw)
In-Reply-To: <3f6790bb-4a36-2439-dece-42fbaa25b55f@redhat.com>
On 2017-10-11 09:05, Pedro Alves wrote:
> On 10/10/2017 09:01 PM, Simon Marchi wrote:
>> Simple replacement of VEC with std::vector.
>>
>> gdb/ChangeLog:
>>
>> * symfile.c (registered_sym_fns): Make struct, not typedef.
>> (DEF_VEC_O (registered_sym_fns)): Remove.
>> (symtab_fns): Change type to std::vector.
>> (add_symtab_fns): Adjust.
>> (find_sym_fns): Adjust.
>
>
> OK.
>
>> - for (i = 0; VEC_iterate (registered_sym_fns, symtab_fns, i, rsf);
>> ++i)
>> - if (our_flavour == rsf->sym_flavour)
>> - return rsf->sym_fns;
>> + for (registered_sym_fns &rsf : symtab_fns)
>
> Small nit: could this be a const ref? I think it's a good
> rule to prefer const over non-const references if we can.
Yes of course, that's an oversight on my part.
Pushed with that fixed, thanks.
Simon
prev parent reply other threads:[~2017-10-11 13:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-10 20:01 Simon Marchi
2017-10-11 13:05 ` Pedro Alves
2017-10-11 13:36 ` 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=063e6faa390b1477d649167cecee2b97@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=simon.marchi@ericsson.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