IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28837


Ignore:
Timestamp:
Aug 3, 2010, 11:36:28 AM (16 years ago)
Author:
mwv
Message:

Restructured building polynomial powers to avoid
an "uninitialized" variable warning for one of the
temporary optimization variables.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libdvo/src/coordops.c

    r27941 r28837  
    3636    *L += X2*coords[0].polyterms[0][0] + XY*coords[0].polyterms[1][0] + Y2*coords[0].polyterms[2][0];
    3737    *M += X2*coords[0].polyterms[0][1] + XY*coords[0].polyterms[1][1] + Y2*coords[0].polyterms[2][1];
    38   }
    39   if (coords[0].Npolyterms > 2) {
    40     X3 = X2*X;
    41     Y3 = Y2*Y;
    42     *L += X3*coords[0].polyterms[3][0] + X2*Y*coords[0].polyterms[4][0] + X*Y2*coords[0].polyterms[5][0] + Y3*coords[0].polyterms[6][0];
    43     *M += X3*coords[0].polyterms[3][1] + X2*Y*coords[0].polyterms[4][1] + X*Y2*coords[0].polyterms[5][1] + Y3*coords[0].polyterms[6][1];
     38
     39    if (coords[0].Npolyterms > 2) {
     40      X3 = X2*X;
     41      Y3 = Y2*Y;
     42      *L += X3*coords[0].polyterms[3][0] + X2*Y*coords[0].polyterms[4][0] + X*Y2*coords[0].polyterms[5][0] + Y3*coords[0].polyterms[6][0];
     43      *M += X3*coords[0].polyterms[3][1] + X2*Y*coords[0].polyterms[4][1] + X*Y2*coords[0].polyterms[5][1] + Y3*coords[0].polyterms[6][1];
     44    }
    4445  }
    4546
Note: See TracChangeset for help on using the changeset viewer.