This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Change target_write_memory_blocks to use std::vector
On 2018-02-26 14:37, Tom Tromey wrote:
"Simon" == Simon Marchi <simark@simark.ca> writes:
+ load_section_data ()
+ {
+ }
Simon> Is this empty constructor needed?
I only added it for clarity. Is there some standard approach to this?
Or a gdb standard?
Of all the C++ patches you did, I can't remember one where you added an
empty constructor :). I think the de-facto standard in C++ is to let
the compiler generate a default constructor instead. If we wanted to be
explicit, we should rather do
load_section_data () = default;
but I think it's just fine to not declare anything.
Simon> Actually, I think it would be nice to give constructors to the
data
Simon> structures when possible, to make it less likely to have them in
Simon> invalid states.
Simon> Here's an example, you can integrate it in your patch if you
like it.
Yeah, this seems better to me.
I will pull it in.
Ok, well at least it invalidates the point above :)
Simon