Bug 690456. Initialize sz in a clearer way. r=joedrew
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Tue, 18 Oct 2011 15:17:32 -0400
changeset 79066 81fdcdc7368d618d238fd9f107ada176a050e0ba
parent 79065 2606bc44cb7cceeafe055da65136e1f9a4d49052
child 79067 ca6cd3b13ea3e24955ed7c119f34d60f04123029
push id247
push usertim.taubert@gmx.de
push dateSat, 22 Oct 2011 19:08:15 +0000
treeherderfx-team@72bb20c484a2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoedrew
bugs690456
milestone10.0a1
Bug 690456. Initialize sz in a clearer way. r=joedrew
gfx/thebes/gfxMatrix.h
--- a/gfx/thebes/gfxMatrix.h
+++ b/gfx/thebes/gfxMatrix.h
@@ -246,18 +246,17 @@ public:
      * to be assumed to be in the X direction or not.
      */
     gfxSize ScaleFactors(bool xMajor) const {
         double det = Determinant();
 
         if (det == 0.0)
             return gfxSize(0.0, 0.0);
 
-        gfxSize sz((xMajor != 0 ? 1.0 : 0.0),
-                        (xMajor != 0 ? 0.0 : 1.0));
+        gfxSize sz = xMajor ? gfxSize(1.0, 0.0) : gfxSize(0.0, 1.0);
         sz = Transform(sz);
 
         double major = sqrt(sz.width * sz.width + sz.height * sz.height);
         double minor = 0.0;
 
         // ignore mirroring
         if (det < 0.0)
             det = - det;