dlls/d3dx8/math.c -- simple fixup (RESEND)

Gerald Pfeifer gerald at pfeifer.com
Wed Dec 26 03:03:07 CST 2007


Not a biggie, but still in my queue.  If you aren't going to take this
(admittedly) minor patch, please let me know and I'll remove it locally.

Gerald

---------- Forwarded message ----------
From: Gerald Pfeifer <gerald at pfeifer.com>
To:  <wine-patches at winehq.org>
Date: Wed, 28 Nov 2007 23:15:07 +0100 (CET)
Subject: dlls/d3dx8/math.c -- simple fixup

I found the following patch in my tree.  I do not recollect the original 
background, but while not a bug fix it simplifies things a bit and fixes 
indentation so I figured I'd pass it along.

Gerald

ChangeLog:
Reduce the scope of a variable and fix identation in D3DXMatrixInverse().

Index: dlls/d3dx8/math.c
===================================================================
RCS file: /home/wine/wine/dlls/d3dx8/math.c,v
retrieving revision 1.59
diff -u -3 -p -r1.59 math.c
--- dlls/d3dx8/math.c	28 Nov 2007 14:03:02 -0000	1.59
+++ dlls/d3dx8/math.c	28 Nov 2007 22:11:55 -0000
@@ -112,7 +112,7 @@ D3DXMATRIX* WINAPI D3DXMatrixInverse(D3D
 {
     int a, i, j;
     D3DXVECTOR4 v, vec[3];
-    FLOAT cofactor, det;
+    FLOAT det;
 
     det = D3DXMatrixfDeterminant(pm);
     if ( !det ) return NULL;
@@ -134,6 +134,7 @@ D3DXMATRIX* WINAPI D3DXMatrixInverse(D3D
     D3DXVec4Cross(&v, &vec[0], &vec[1], &vec[2]);
     for (j=0; j<4; j++)
     {
+     FLOAT cofactor;
      switch(j)
      {
       case 0: cofactor = v.x; break;
@@ -141,7 +142,7 @@ D3DXMATRIX* WINAPI D3DXMatrixInverse(D3D
       case 2: cofactor = v.z; break;
       case 3: cofactor = v.w; break;
      }
-    pout->u.m[j][i] = pow(-1.0f, i) * cofactor / det;
+     pout->u.m[j][i] = pow(-1.0f, i) * cofactor / det;
     }
    }
     return pout;



More information about the wine-patches mailing list