changed code to avoid a compiler warning

This commit is contained in:
Davis King 2011-12-13 18:05:36 -05:00
parent 3ecacdccb6
commit acb1cdf2df
1 changed files with 5 additions and 1 deletions

View File

@ -84,7 +84,11 @@ namespace dlib
private:
inline void check_image_type (const IplImage* img) const
inline void check_image_type (const IplImage*
#ifdef ENABLE_ASSERTS
img // the #ifdef is here to avoid an unused warning argument from the compiler
#endif
) const
{
DLIB_ASSERT( img->dataOrder == 0, "Only interleaved color channels are supported with cv_image");
DLIB_ASSERT((img->depth&0xFF)/8*img->nChannels == sizeof(pixel_type),