[PATCH 1/4] Remove assertion with side-effects
Dodji Seketeli
dodji@seketeli.org
Mon Jan 1 00:00:00 GMT 2018
Hello Jonathan,
Jonathan Wakely <jwakely@redhat.com> a écrit:
> Calling assert(split_string(...)) won't do anything when NDEBUG is
> defined, but the split_string call can be avoided anyway.
>
> Since only the first result from the split string is needed, and
> remove_trailing_white_spaces will trim white space anyway, the overhead
> of parsing it into a vector can be avoided by using std::string::substr
> directly. Additionally, calling std::string::find with a single char is
> more efficient than with a string.
Applied to master. I just added a ChangeLog part to it.
Thanks!
--
Dodji
More information about the Libabigail
mailing list