IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 4, 2008, 2:10:40 PM (18 years ago)
Author:
eugene
Message:

some efficiency improvements and cleanups to the footprint code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/pmFootprintIDs.c

    r17443 r17516  
    7474 * Set an image to the value of footprint's ID whever they may fall
    7575 */
    76 psImage *pmSetFootprintID(const pmFootprint *fp, // the footprint to insert
     76psImage *pmSetFootprintID(psImage *idImage,
     77                          const pmFootprint *fp, // the footprint to insert
    7778                          const int id) {       // the desired ID
    7879   assert(fp != NULL && pmFootprintTest((const psPtr)fp));
     
    8384   assert (numCols >= 0 && numRows >= 0);
    8485   
    85    psImage *idImage = psImageAlloc(numCols, numRows, PS_TYPE_S32);
     86   if (idImage == NULL) {
     87       idImage = psImageAlloc(numCols, numRows, PS_TYPE_S32);
     88   } else {
     89       assert (idImage->numCols == numCols);
     90       assert (idImage->numRows == numRows);
     91       // XXX assert on type (S32)
     92   }
    8693   P_PSIMAGE_SET_ROW0(idImage, row0);
    8794   P_PSIMAGE_SET_COL0(idImage, col0);
Note: See TracChangeset for help on using the changeset viewer.