IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15162


Ignore:
Timestamp:
Oct 2, 2007, 9:39:56 AM (19 years ago)
Author:
gusciora
Message:

Replaced the two assert() calls in pmBiasSubtractFrame() with several
PS_ASSERT type asserts. This will make things fail gracefully, instead of an
abort when called with bad input parameters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmBias.c

    r14505 r15162  
    2525                         )
    2626{
    27     assert(in);
    28     assert(sub);
     27    PS_ASSERT_PTR_NON_NULL(in, false);
     28    PS_ASSERT_PTR_NON_NULL(in->image, false);
     29    PS_ASSERT_IMAGE_TYPE(in->image, PS_TYPE_F32, false);
     30    PS_ASSERT_IMAGE_NON_EMPTY(in->image, false);
     31    PS_ASSERT_PTR_NON_NULL(sub, false);
     32    PS_ASSERT_PTR_NON_NULL(sub->image, false);
     33    PS_ASSERT_IMAGE_TYPE(sub->image, PS_TYPE_F32, false);
     34    PS_ASSERT_IMAGE_NON_EMPTY(sub->image, false);
     35    PS_ASSERT_IMAGES_SIZE_EQUAL(in->image, sub->image, false);
    2936
    3037    psImage *inImage  = in->image;      // The input image
Note: See TracChangeset for help on using the changeset viewer.