Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Change target_write_memory_blocks to use std::vector
Date: Mon, 26 Feb 2018 19:45:00 -0000	[thread overview]
Message-ID: <e6513bc669e6c9312e103677f58bad55@simark.ca> (raw)
In-Reply-To: <87h8q3pmnf.fsf@tromey.com>

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


      reply	other threads:[~2018-02-26 19:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-25 17:37 Tom Tromey
2018-02-25 20:44 ` [PATCH] Add test for load command Simon Marchi
2018-02-26 19:16   ` Tom Tromey
2018-02-26 20:59     ` Simon Marchi
2018-02-25 22:26 ` [RFA] Change target_write_memory_blocks to use std::vector Simon Marchi
2018-02-26 19:38   ` Tom Tromey
2018-02-26 19:45     ` 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=e6513bc669e6c9312e103677f58bad55@simark.ca \
    --to=simark@simark.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