> > int prefix_len = strlen (prefix);
> > - const char *term = NULL;
> > + std::string term;
> > char *value;
> >
> > i.skip_to (prefix);
> >
> > - if (i != end)
> > - term = (*i).c_str ();
> > + if (i == end)
> > + return NULL;
> >
> > - if (!term || strncmp (term, prefix, prefix_len))
> > + term = *i;
>
> ... hmm, a raii(?) solution above would be std::string term = *i;
I'm not sure what's raii (I'm not very good at c++ ...), but I guess you
mean to use 'std::string term = *i;' to avoid copy constructor. That
surely is a good idea. Let me rework the patch!
--
Vlad
_______________________________________________
notmuch mailing list
[email protected]
http://notmuchmail.org/mailman/listinfo/notmuch