Bug 848611 - MathAlgorithms.h:116: error: 'fabsl' was not declared in this scope. r=Waldo
authorOleg Romashin <romaxa@gmail.com>
Thu, 14 Mar 2013 00:16:55 -0700
changeset 135208 051405e33fc4e68e1b68e67b2f3171fcfe2d9509
parent 135207 071f201633608c7b57f9433eb270d2b72607540e
child 135209 a9984c7bfb50e7e9d0ed82c923c22c3809a711c6
push id2452
push userlsblakk@mozilla.com
push dateMon, 13 May 2013 16:59:38 +0000
treeherdermozilla-beta@d4b152d29d8d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs848611
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 848611 - MathAlgorithms.h:116: error: 'fabsl' was not declared in this scope. r=Waldo
mfbt/MathAlgorithms.h
--- a/mfbt/MathAlgorithms.h
+++ b/mfbt/MathAlgorithms.h
@@ -7,18 +7,18 @@
 
 #ifndef mozilla_MathAlgorithms_h_
 #define mozilla_MathAlgorithms_h_
 
 #include "mozilla/Assertions.h"
 #include "mozilla/StandardInteger.h"
 #include "mozilla/TypeTraits.h"
 
+#include <cmath>
 #include <limits.h>
-#include <math.h>
 
 namespace mozilla {
 
 // Greatest Common Divisor
 template<typename IntegerType>
 MOZ_ALWAYS_INLINE IntegerType
 EuclidGCD(IntegerType a, IntegerType b)
 {
@@ -126,28 +126,28 @@ Abs(const T t)
   typedef typename detail::AbsReturnType<T>::Type ReturnType;
   return t >= 0 ? ReturnType(t) : ~ReturnType(t) + 1;
 }
 
 template<>
 inline float
 Abs<float>(const float f)
 {
-  return fabsf(f);
+  return std::fabs(f);
 }
 
 template<>
 inline double
 Abs<double>(const double d)
 {
-  return fabs(d);
+  return std::fabs(d);
 }
 
 template<>
 inline long double
 Abs<long double>(const long double d)
 {
-  return fabsl(d);
+  return std::fabs(d);
 }
 
 } /* namespace mozilla */
 
 #endif  /* mozilla_MathAlgorithms_h_ */