[RFA v2 10/17] C++ify mi_parse

Pedro Alves palves@redhat.com
Wed Apr 12 11:26:00 GMT 2017


On 04/11/2017 04:01 PM, Tom Tromey wrote:
> -  memset (parse, 0, sizeof (*parse));
> +  std::unique_ptr<struct mi_parse> parse (new struct mi_parse);
> +  memset (parse.get (), 0, sizeof (struct mi_parse));
>    parse->all = 0;

The patch made mi_parse be a non-POD (non-trivial dtor), so I
think we should get rid of that memset at the same time.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list