Bug 563195: Fix -Wshadow warnings in gfx that affect layout/style. r=derf
authorL. David Baron <dbaron@dbaron.org>
Sun, 17 Feb 2013 22:56:32 -0800
changeset 122209 ff75b06e2330e7586556bdea50c31e27ff550a55
parent 122208 4fa2028f2e3c8b926018621b8efcf5eb5facb09b
child 122210 df03beb83b39fa9fac1267bb785086d9094fb482
push id24322
push userdbaron@mozilla.com
push dateMon, 18 Feb 2013 08:55:11 +0000
treeherdermozilla-central@0acbd06d48a9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersderf
bugs563195
milestone21.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 563195: Fix -Wshadow warnings in gfx that affect layout/style. r=derf A better name here would be welcome.
gfx/thebes/gfxQuaternion.h
--- a/gfx/thebes/gfxQuaternion.h
+++ b/gfx/thebes/gfxQuaternion.h
@@ -34,23 +34,23 @@ struct THEBES_API gfxQuaternion : public
     gfxQuaternion Slerp(const gfxQuaternion &aOther, gfxFloat aCoeff) {
         gfxFloat dot = mozilla::clamped(DotProduct(aOther), -1.0, 1.0);
         if (dot == 1.0) {
             return *this;
         }
 
         gfxFloat theta = acos(dot);
         gfxFloat rsintheta = 1/sqrt(1 - dot*dot);
-        gfxFloat w = sin(aCoeff*theta)*rsintheta;
+        gfxFloat rightWeight = sin(aCoeff*theta)*rsintheta;
 
         gfxQuaternion left = *this;
         gfxQuaternion right = aOther;
 
-        left *= cos(aCoeff*theta) - dot*w;
-        right *= w;
+        left *= cos(aCoeff*theta) - dot*rightWeight;
+        right *= rightWeight;
 
         return left + right;
     }
 
     gfx3DMatrix ToMatrix() {
         gfx3DMatrix temp;
 
         temp[0][0] = 1 - 2 * (y * y + z * z);