IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 1, 2006, 2:55:23 PM (20 years ago)
Author:
Paul Price
Message:

Addition of a vast quantity of assertions in public functions. Adopted a policy of using assert() within file-static functions (since they are only called internally, any errors there are problems with the program) and using the PS_ASSERT_WHATEVER() macros within public functions. Cleaned a few things up in the process.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPARead.c

    r7274 r7278  
    2727                        )
    2828{
     29    assert(readout);
     30    assert(image);
     31    assert(trimsec);
     32    assert(biassecs);
     33
    2934    // The image corresponding to the trim region
    3035    if (psRegionIsBad(*trimsec)) {
     
    8590                             )
    8691{
     92    assert(fits);
     93    assert(region);
     94
    8795    bool resize = false;                // Do we need to resize the image once read?
    8896    psRegion toRead = psRegionSet(region->x0, region->x1, region->y0, region->y1); // Region to read
     
    158166                      )
    159167{
     168    PS_ASSERT_PTR_NON_NULL(readout, false);
     169    PS_ASSERT_PTR_NON_NULL(fits, false);
     170    PS_ASSERT_INT_NONNEGATIVE(z, false);
     171    PS_ASSERT_INT_NONNEGATIVE(numScans, false);
     172
    160173    // Get the HDU and read the header
    161174    pmCell *cell = readout->parent;     // The parent cell
     
    298311               )
    299312{
     313    PS_ASSERT_PTR_NON_NULL(cell, false);
     314    PS_ASSERT_PTR_NON_NULL(fits, false);
     315
    300316    pmHDU *hdu = pmHDUFromCell(cell);   // The HDU
    301317    if (!hdu) {
     
    345361               )
    346362{
     363    PS_ASSERT_PTR_NON_NULL(chip, false);
     364    PS_ASSERT_PTR_NON_NULL(fits, false);
     365
    347366    bool success = false;               // Were we able to read at least one HDU?
    348367    psArray *cells = chip->cells;       // Array of cells
     
    366385              )
    367386{
     387    PS_ASSERT_PTR_NON_NULL(fpa, false);
     388    PS_ASSERT_PTR_NON_NULL(fits, false);
     389
    368390    bool success = false;               // Were we able to read at least one HDU?
    369391    psArray *chips = fpa->chips;        // Array of chips
Note: See TracChangeset for help on using the changeset viewer.