This is the mail archive of the
mailing list for the GDB project.
Re: [RFA 2/5] Use std::string in cp-namespace.c
>>>>> "Pedro" == Pedro Alves <email@example.com> writes:
Pedro> On 09/22/2016 06:50 PM, Tom Tromey wrote:
>> - name_copy[prefix_len] = '\0';
>> + name_copy.erase (prefix_len, name_copy.size ());
Pedro> Passing name_copy.size () here looks odd, since that parameter is
Pedro> how many bytes to erase. Just don't pass a second parameter,
Pedro> which defaults to std::string::npos?
For some reason I was under the impression that the 1-arg form just
removed a single character, but I see that's incorrect. Thanks.