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/pmChipMosaic.c

    r7017 r7278  
    4141                          )
    4242{
     43    assert(bounds);
     44    assert(chip);
     45
    4346    if (primary) {
    4447        *bounds = psRegionSet(INFINITY, 0, INFINITY, 0);
     
    104107                         )
    105108{
     109    assert(xBinChip);
     110    assert(yBinChip);
     111    assert(chip);
     112
    106113    // Check that we've got the HDU in the chip or the FPA
    107114    if ((!chip->hdu || !chip->hdu->images) && (!chip->parent->hdu || !chip->parent->hdu->images)) {
     
    358365                        )
    359366{
     367    assert(target);
     368    assert(sources);
     369    assert(xBin > 0 && yBin > 0);
     370    assert(trimsec);
     371
    360372    bool success = true;                // Result of setting everything
    361373    float gain       = 0.0;             // Gain
     
    433445    }
    434446
    435 
    436447    return success;
    437448}
     
    446457               )
    447458{
     459    assert(mosaicImage);
     460    assert(mosaicMask);
     461    assert(mosaicWeights);
     462    assert(chip);
     463
    448464    psArray *cells = chip->cells;       // The array of cells
    449465    int numCells = cells->n;            // Number of cells
     
    587603                 )
    588604{
     605    PS_ASSERT_PTR_NON_NULL(chip, false);
     606
    589607    psImage *mosaicImage   = NULL;      // The mosaic image
    590608    psImage *mosaicMask    = NULL;      // The mosaic mask
Note: See TracChangeset for help on using the changeset viewer.