← Back to team overview

kicad-developers team mailing list archive

Rev 6350, abs vs std::abs

 

Mostly directed at JP:

Back in June, I went through and changed a few 'weird' things we were doing, including using C abs instead of C++ std::abs:

http://bazaar.launchpad.net/~kicad-product-committers/kicad/product/revision/5831

You just changed it back:

http://bazaar.launchpad.net/~kicad-product-committers/kicad/product/revision/6350

What compiler could possibly have an issue with that? std::abs is, for very good reason, the preferred way to find absolute value in C++. As such, if there is some obscure reason we need to use abs(), would it kill you to leave some explanation behind so nobody else also gets confused by that? A real explanation in the commit message would be extremely helpful, as possibly would a comment in the vicinity of the intentionally nonstandard code.

--
Chris



Follow ups