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/ Jeff _______________________________________________ dev-platform mailing list [email protected] https://lists.mozilla.org/listinfo/dev-platform

