[PATCH 2/2] gdb: make gdbarch_displaced_step_copy_insn return an std::unique_ptr

Simon Marchi simon.marchi@efficios.com
Fri Feb 14 20:31:00 GMT 2020


On 2020-02-14 2:48 p.m., Pedro Alves wrote:
> BTW, when I see a bunch of std::unique_ptr<footype>
> I wonder whether a footype_up typedef wouldn't make things
> read a bit clearer.

Personally I don't mind the explicit std::unique_ptr<footype>,
unless we're starting to use containers of that type.  I then prefer:

  std::vector<footype_up>

over

  std::vector<std::unique_ptr<footype>>

But I also don't mind using a typedef either, even without using containers,
so I'll do that change as a separate patch on top.

Thanks for the review!

Simon




More information about the Gdb-patches mailing list