Bug 703028: Fix obnoxious warning spew from gfx 2d stuff. r=me
authorKyle Huey <khuey@kylehuey.com>
Mon, 21 Nov 2011 09:56:24 -0500
changeset 82175 78cd6a30e25063fc7d7bf3ec8c23975fc46112cc
parent 82174 763d63759721547520fbd9b9b5216a2a34b3df00
child 82196 9276e3274f18d69c840df1fa44f8b5b32d0e567a
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs703028
milestone11.0a1
first release with
nightly linux32
78cd6a30e250 / 11.0a1 / 20111121092346 / files
nightly linux64
78cd6a30e250 / 11.0a1 / 20111121092346 / files
nightly mac
78cd6a30e250 / 11.0a1 / 20111121092346 / files
nightly win32
78cd6a30e250 / 11.0a1 / 20111121092346 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 703028: Fix obnoxious warning spew from gfx 2d stuff. r=me
gfx/2d/Point.h
gfx/2d/Rect.h
--- a/gfx/2d/Point.h
+++ b/gfx/2d/Point.h
@@ -54,32 +54,33 @@ struct IntPoint :
 };
 
 struct Point :
   public BasePoint<Float, Point> {
   typedef BasePoint<Float, Point> Super;
 
   Point() : Super() {}
   Point(Float aX, Float aY) : Super(aX, aY) {}
-  Point(const IntPoint& point) : Super(point.x, point.y) {}
+  Point(const IntPoint& point) : Super(float(point.x), float(point.y)) {}
 };
 
 struct IntSize :
   public BaseSize<int32_t, IntSize> {
   typedef BaseSize<int32_t, IntSize> Super;
 
   IntSize() : Super() {}
   IntSize(int32_t aWidth, int32_t aHeight) : Super(aWidth, aHeight) {}
 };
 
 struct Size :
   public BaseSize<Float, Size> {
   typedef BaseSize<Float, Size> Super;
 
   Size() : Super() {}
   Size(Float aWidth, Float aHeight) : Super(aWidth, aHeight) {}
-  explicit Size(const IntSize& size) : Super(size.width, size.height) {}
+  explicit Size(const IntSize& size) :
+    Super(float(size.width), float(size.height)) {}
 };
 
 }
 }
 
 #endif /* MOZILLA_GFX_POINT_H_ */
--- a/gfx/2d/Rect.h
+++ b/gfx/2d/Rect.h
@@ -76,15 +76,16 @@ struct Rect :
     typedef BaseRect<Float, Rect, Point, mozilla::gfx::Size, Margin> Super;
 
     Rect() : Super() {}
     Rect(Point aPos, mozilla::gfx::Size aSize) :
         Super(aPos, aSize) {}
     Rect(Float _x, Float _y, Float _width, Float _height) :
         Super(_x, _y, _width, _height) {}
     explicit Rect(const IntRect& rect) :
-        Super(rect.x, rect.y, rect.width, rect.height) {}
+        Super(float(rect.x), float(rect.y),
+              float(rect.width), float(rect.height)) {}
 };
 
 }
 }
 
 #endif /* MOZILLA_GFX_RECT_H_ */