>Mozilla used to use NS_ABS to compute absolute values, but half a year ago
>we switched to std::abs.  Unfortunately, practical experience with std::abs
>has pointed out various issues with it: the various overloads are
>confusingly split across multiple headers, std::abs(int64_t) doesn't always
>work, and std::abs doesn't work with INT32_MIN, INT64_MIN, and so on.
>
>For these reasons we recently introduced mozilla::Abs, in
>mozilla/MathAlgorithms.h, to mfbt.  Going forward, you should use that
>function, not abs or std::abs, to compute absolute values.  Slightly more
>detail is here if you want it:
>
>http://whereswalden.com/2013/04/30/introducing-mozillaabs-to-mfbt/

What about all the abs() calls in imported libraries?  I assume leave
them unless there's a demonstrated problem?

-- 
Randell Jesup, Mozilla Corp
remove ".news" for personal email
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to