~ps-jenkins/compiz/latestsnapshot-10.9.9daily13.06.1913.04-0ubuntu1

« back to all changes in this revision

Viewing changes to plugins/opengl/src/matrix.cpp

  • Committer: MC Return
  • Date: 2012-12-01 17:07:09 UTC
  • mto: This revision was merged to the branch mainline in revision 3503.
  • Revision ID: mc.return@gmx.net-20121201170709-9us3w77m7b0cr4vu
Simplified declaration of int i by moving it into the for loop, where i is eventually used

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
         const float *a,
89
89
         const float *b)
90
90
{
91
 
    int i;
92
 
 
93
 
    for (i = 0; i < 4; i++)
 
91
    for (int i = 0; i < 4; i++)
94
92
    {
95
93
        const float ai0 = A(i,0), ai1 = A(i,1), ai2 = A(i,2), ai3 = A(i,3);
96
94
 
170
168
bool GLMatrix::invert ()
171
169
{
172
170
    float inv[16], det;
173
 
    int i;
174
171
 
175
172
    inv[0] =   m[5]*m[10]*m[15] - m[5]*m[11]*m[14] - m[9]*m[6]*m[15]
176
173
             + m[9]*m[7]*m[14] + m[13]*m[6]*m[11] - m[13]*m[7]*m[10];
211
208
 
212
209
    det = 1.0f / det;
213
210
 
214
 
    for (i = 0; i < 16; i++)
 
211
    for (int i = 0; i < 16; i++)
215
212
        m[i] = inv[i] * det;
216
213
 
217
214
    return true;