IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 12, 2006, 10:44:04 AM (20 years ago)
Author:
magnier
Message:

replaced dangerous code with P_PSIMAGE_SET_NUMCOLS, etc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/mathtypes/psImage.c

    r7071 r7524  
    99 *  @author Ross Harman, MHPCC
    1010 *
    11  *  @version $Revision: 1.104 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2006-05-05 02:48:34 $
     11 *  @version $Revision: 1.105 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2006-06-12 20:43:16 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    8585    }
    8686
    87     *(psS32 *)&image->col0 = 0;
    88     *(psS32 *)&image->row0 = 0;
    89     *(psU32 *)&image->numCols = numCols;
    90     *(psU32 *)&image->numRows = numRows;
    91     *(psDimen* ) & image->type.dimen = PS_DIMEN_IMAGE;
    92     *(psElemType* ) & image->type.type = type;
     87    image->col0 = 0;
     88    image->row0 = 0;
     89    P_PSIMAGE_SET_NUMCOLS (image, numCols);
     90    P_PSIMAGE_SET_NUMROWS (image, numRows);
     91
     92    psMathType imageType;
     93    imageType.dimen = PS_DIMEN_IMAGE;
     94    imageType.type = type;
     95    P_PSIMAGE_SET_TYPE (image, imageType);
     96
    9397    image->parent = NULL;
    9498    image->children = NULL;
Note: See TracChangeset for help on using the changeset viewer.