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 id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersderf
bugs563195
milestone21.0a1
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);