And then it would recommend to use std::accumulate for this loop. Is this
something that could be integrated directly into cppcheck? Would we want to
use new category or reuse a current one(such as style or performance)?
I guess an addon could be added but these are not that easy to use and aren't
installed with cmake installation. I would like something integrated into
cppcheck.
Thanks,
Paul
Last edit: Paul Fultz 2018-08-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I would like to add a check to recommend a C++ algorithm if possible instead
of a raw loop. That is, something like:
And then it would recommend to use
std::accumulate
for this loop. Is thissomething that could be integrated directly into cppcheck? Would we want to
use new category or reuse a current one(such as
style
orperformance
)?I guess an addon could be added but these are not that easy to use and aren't
installed with cmake installation. I would like something integrated into
cppcheck.
Thanks,
Paul
Last edit: Paul Fultz 2018-08-21