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 v2 5/5] Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy


On 01/25/2017 06:39 PM, Simon Marchi wrote:
> On 2017-01-25 13:28, Pedro Alves wrote:
>>> If it had been "to std::move the string contents out..." it might have
>>> been a bit clearer, I'm not entirely sure.
>>
>> That would read a bit odd to me, since "std::move" itself
>> does nothing, it's just a cast.
> 
> I think it's obvious that if you're going to use std::move, it's to move
> the value somewhere, not just "std::move (buf);" by itself.  But if you
> want to go with the more explicit comment below, it's fine with me.  It
> shows the use case more clearly.

OK, I'll go with the extended comment then (...)

>> +      string_file buf;
>> +      buf.printf (....");
>> +      buf.printf (....");

(...) with the spurious " removed ...

Thanks,
Pedro Alves


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