[RFA 8/8] Add constructor and destructor to demangle_parse_info
Tue Dec 13 13:50:00 GMT 2016
>>>>> "Pedro" == Pedro Alves <firstname.lastname@example.org> writes:
Pedro> When initializing a unique_ptr from a function that returns a
Pedro> unique_ptr already, IMO, using = reads a little better
Pedro> over ()s, like:
Pedro> std::unique_ptr<demangle_parse_info> info
Pedro> = cp_demangled_name_to_comp (demangled_name, NULL);
Pedro> I.e., kind of like how you'd call make_unique with '=' instead
Pedro> unique_ptr<T> foo (make_unique<T>());
Pedro> which I've never seen.
Pedro> I wonder whether that's just me?
I don't really have a preference either way.
I made this change.
>> + demangle_parse_info ();
>> + ~demangle_parse_info ();
Pedro> Put these before the data fields.
More information about the Gdb-patches