KDABLabs / KDToolBox

KDAB's collection of miscellaneous useful C++ classes and stuff
Other
320 stars 47 forks source link

makes FlatIterator::canCompare a static method #15

Closed cpi47 closed 3 years ago

cpi47 commented 3 years ago

By making it a static method, the method interface ensures that no members are modified. This was i.e. detected as a warning by CppCheck :"Assert statement calls a function which may have desired side effects: 'canCompare'."

marc-kdab commented 3 years ago

Thanks for the patch. We've taken it as cue to add cppcheck to our internal CI pipeline and fixed all the issues reported, incl. this one (differently, to avoid any copyright problems). Should show up in this repo in a few days.