Bug 1245525: Fix some compiler errors in Moz2D type classes. r=jrmuizel
authorBas Schouten <bschouten@mozilla.com>
Wed, 03 Feb 2016 19:44:41 +0100
changeset 305899 d527c9506afa1c82b93df132f67c6f46cf726d88
parent 305898 aefcbefbda17e3b7ece5e42de1b004de066e5b0b
child 305900 8c41c8315eeafe568b8d1ce99fedbd79eee62586
push id9214
push userraliiev@mozilla.com
push dateMon, 07 Mar 2016 14:25:21 +0000
treeherdermozilla-aurora@8849dd1a4a79 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1245525
milestone47.0a1
Bug 1245525: Fix some compiler errors in Moz2D type classes. r=jrmuizel
gfx/2d/BaseMargin.h
gfx/2d/Matrix.h
--- a/gfx/2d/BaseMargin.h
+++ b/gfx/2d/BaseMargin.h
@@ -16,20 +16,20 @@ namespace mozilla {
 struct Sides final {
   Sides() : mBits(0) {}
   explicit Sides(SideBits aSideBits)
   {
     MOZ_ASSERT((aSideBits & ~eSideBitsAll) == 0, "illegal side bits");
     mBits = aSideBits;
   }
   bool IsEmpty() const { return mBits == 0; }
-  bool Top()     const { return mBits & eSideBitsTop; }
-  bool Right()   const { return mBits & eSideBitsRight; }
-  bool Bottom()  const { return mBits & eSideBitsBottom; }
-  bool Left()    const { return mBits & eSideBitsLeft; }
+  bool Top()     const { return (mBits & eSideBitsTop) != 0; }
+  bool Right()   const { return (mBits & eSideBitsRight) != 0; }
+  bool Bottom()  const { return (mBits & eSideBitsBottom) != 0; }
+  bool Left()    const { return (mBits & eSideBitsLeft) != 0; }
   bool Contains(SideBits aSideBits) const
   {
     MOZ_ASSERT((aSideBits & ~eSideBitsAll) == 0, "illegal side bits");
     return (mBits & aSideBits) == aSideBits;
   }
   Sides operator|(Sides aOther) const
   {
     return Sides(SideBits(mBits | aOther.mBits));
--- a/gfx/2d/Matrix.h
+++ b/gfx/2d/Matrix.h
@@ -293,18 +293,18 @@ public:
   }
 
   /**
    * Returns true if the matrix is anything other than a straight
    * translation by integers.
   */
   bool HasNonIntegerTranslation() const {
     return HasNonTranslation() ||
-      !FuzzyEqual(_31, floor(_31 + 0.5)) ||
-      !FuzzyEqual(_32, floor(_32 + 0.5));
+      !FuzzyEqual(_31, floor(_31 + Float(0.5))) ||
+      !FuzzyEqual(_32, floor(_32 + Float(0.5)));
   }
 
   /**
    * Returns true if the matrix only has an integer translation.
    */
   bool HasOnlyIntegerTranslation() const {
     return !HasNonIntegerTranslation();
   }