cppcheck algorithm suggestions
Dr. David Alan Gilbert
dave at treblig.org
Sat Jan 23 21:36:57 UTC 2021
Hi,
What are peoples feelings for cppcheck's suggestions for stl algorithms?
In https://gerrit.libreoffice.org/c/core/+/109846 I did a 'any_of'
and a 'accumulate' that it suggested; the any_of does look better,
the accumulate seems marginally better.
Does the project/people have general preferences on whether it's
worth tackling these suggestions?
I was less sure what to do with the suggestions for 'transform';
some of them were replacing very simple loops; another
was using emplace_back to add the results to the destination and I wasn't
sure what I'd pass into transform for the equivalent.
Dave
--
-----Open up your eyes, open up your mind, open up your code -------
/ Dr. David Alan Gilbert | Running GNU/Linux | Happy \
\ dave @ treblig.org | | In Hex /
\ _________________________|_____ http://www.treblig.org |_______/
More information about the LibreOffice
mailing list