This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 2/5] Use std::string in cp-namespace.c
On 09/22/2016 06:50 PM, Tom Tromey wrote:
> - name_copy[prefix_len] = '\0';
> + name_copy.erase (prefix_len, name_copy.size ());
Passing name_copy.size () here looks odd, since that parameter is
how many bytes to erase. Just don't pass a second parameter,
which defaults to std::string::npos?
> context = lookup_typename (lang, arch,
> - name_copy,
> + name_copy.c_str (),
> parent, 1);
> }
>
--
Thanks,
Pedro Alves