[PATCH] abg-comparison: prefer .empty() over implicit bool conversion of .size()
Dodji Seketeli
dodji@seketeli.org
Wed Jan 1 00:00:00 GMT 2020
Hello,
Matthias Maennich <maennich@google.com> a écrit:
> size() is not guaranteed to be a constant-time function. Also, using
> .empty() shows clearer intent. Hence switch to using .empty().
> That issue was flagged by clang-tidy[1].
>
> * src/abg-comparison.cc (corpus_diff::has_changes): prefer
> !container.empty() over bool(container.size())
This is obviously OK to commit to master.
Thanks!
--
Dodji
More information about the Libabigail
mailing list