This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove cleanups from linespec.c


>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:

>> +      gdb_assert (state->canonical_names[i].suffix != NULL);
>> +      gdb::unique_xmalloc_ptr<char> holder
>> +	(state->canonical_names[i].suffix);
>> +      hold_names.push_back (std::move (holder));

Simon> emplace_back?

Thanks, that is much nicer.

Simon> I suppose that ideally, these strings would be owned and deleted by
Simon> the linespec_state structure itself?

Yeah, that's one of the several ways linespec could be improved.
I tried once to do a big cleanup of all this, which convinced me that
doing lots of tiny steps is a better approach :-)

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]