Bug 1012971 - Fix compiler warnings in mfbt r=nbp
authorDan Gohman <sunfish@mozilla.com>
Thu, 22 May 2014 11:15:06 -0700
changeset 184556 55b109739287466cecae2b22a415c2984eecc97c
parent 184555 fab2921f6306e1a462dc32b869d2f6650cfac8ae
child 184557 642d007d13203514836047a3c6dc9617509fd374
push id26826
push usercbook@mozilla.com
push dateFri, 23 May 2014 13:41:49 +0000
treeherdermozilla-central@e3d39ffacb5e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs1012971
milestone32.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 1012971 - Fix compiler warnings in mfbt r=nbp
mfbt/FloatingPoint.h
mfbt/Scoped.h
--- a/mfbt/FloatingPoint.h
+++ b/mfbt/FloatingPoint.h
@@ -333,25 +333,25 @@ namespace detail {
 template<typename T>
 struct FuzzyEqualsEpsilon;
 
 template<>
 struct FuzzyEqualsEpsilon<float>
 {
   // A number near 1e-5 that is exactly representable in
   // floating point
-  static const float value() { return 1.0f / (1 << 17); }
+  static float value() { return 1.0f / (1 << 17); }
 };
 
 template<>
 struct FuzzyEqualsEpsilon<double>
 {
   // A number near 1e-12 that is exactly representable in
   // a double
-  static const double value() { return 1.0 / (1LL << 40); }
+  static double value() { return 1.0 / (1LL << 40); }
 };
 
 } // namespace detail
 
 /**
  * Compare two floating point values for equality, modulo rounding error. That
  * is, the two values are considered equal if they are both not NaN and if they
  * are less than or equal to epsilon apart. The default value of epsilon is near
--- a/mfbt/Scoped.h
+++ b/mfbt/Scoped.h
@@ -285,18 +285,18 @@ template <> inline void TypeSpecificDele
 typedef ::mozilla::TypeSpecificScopedPointer<Type> name;
 
 template <typename T> void TypeSpecificDelete(T * value);
 
 template <typename T>
 struct TypeSpecificScopedPointerTraits
 {
     typedef T* type;
-    const static type empty() { return nullptr; }
-    const static void release(type value)
+    static type empty() { return nullptr; }
+    static void release(type value)
     {
       if (value)
         TypeSpecificDelete(value);
     }
 };
 
 SCOPED_TEMPLATE(TypeSpecificScopedPointer, TypeSpecificScopedPointerTraits)