void RBaseStream::setPos( int pos )
{
- assert( isOpened() && pos >= 0 );
+ CV_Assert(isOpened() && pos >= 0);
if( !m_file )
{
int RBaseStream::getPos()
{
- assert( isOpened() );
+ CV_Assert(isOpened());
return m_block_pos + (int)(m_current - m_start);
}
void RBaseStream::skip( int bytes )
{
- assert( bytes >= 0 );
+ CV_Assert(bytes >= 0);
m_current += bytes;
}
{
uchar* data = (uchar*)buffer;
int readed = 0;
- assert( count >= 0 );
+ CV_Assert(count >= 0);
while( count > 0 )
{
{
int size = (int)(m_current - m_start);
- assert( isOpened() );
+ CV_Assert(isOpened());
if( size == 0 )
return;
int WBaseStream::getPos()
{
- assert( isOpened() );
+ CV_Assert(isOpened());
return m_block_pos + (int)(m_current - m_start);
}
{
uchar* data = (uchar*)buffer;
- assert( data && m_current && count >= 0 );
+ CV_Assert(data && m_current && count >= 0);
while( count )
{
#include "utils.hpp"
#include "grfmt_pam.hpp"
+using namespace cv;
+
/* the PAM related fields */
#define MAX_PAM_HEADER_IDENITFIER_LENGTH 8
#define MAX_PAM_HEADER_VALUE_LENGTH 255
}
break;
default:
- assert (0);
+ CV_Error(Error::StsInternal, "");
}
break;
}
}
break;
default:
- assert (0);
+ CV_Error(Error::StsInternal, "");
}
break;
}
default:
- assert (0);
+ CV_Error(Error::StsInternal, "");
}
}
} else
strm.putBytes( data, stride*height );
} else
- assert (0);
+ CV_Error(Error::StsInternal, "");
strm.close();
return true;
m_type = IsColorPalette( m_palette, m_bpp ) ? CV_8UC3 : CV_8UC1;
m_offset = m_strm.getPos();
- assert( m_offset == 32 + m_maplength );
+ CV_Assert(m_offset == 32 + m_maplength);
result = true;
}
}
m_offset = m_strm.getPos();
- assert( m_offset == 32 + m_maplength );
+ CV_Assert(m_offset == 32 + m_maplength);
result = true;
}
}
code = m_strm.getByte();
if( len > line_end - tsrc )
{
- assert(0);
+ CV_Error(Error::StsInternal, "");
goto bad_decoding_1bpp;
}
result = true;
break;
default:
- assert(0);
+ CV_Error(Error::StsInternal, "");
}
}
CV_CATCH_ALL
#include <string.h>
#include <limits.h>
#include <ctype.h>
-#include <assert.h>
#if defined _WIN32 || defined WINCE
#include <windows.h>
icvCvt_BGR2Gray_8u_C3C1R( s, s_step, d, d_step, size, swap_rb );
break;
case 33:
- assert( swap_rb );
+ CV_Assert(swap_rb);
icvCvt_RGB2BGR_8u_C3R( s, s_step, d, d_step, size );
break;
case 41: