removed duplication
This commit is contained in:
parent
5a4fa4607b
commit
ce2284e2e6
@ -431,7 +431,7 @@ template<typename _Tp> inline _Tp* Mat::ptr(int y)
|
|||||||
|
|
||||||
template<typename _Tp> inline const _Tp* Mat::ptr(int y) const
|
template<typename _Tp> inline const _Tp* Mat::ptr(int y) const
|
||||||
{
|
{
|
||||||
CV_DbgAssert( y == 0 || (data && dims >= 1 && data && (unsigned)y < (unsigned)size.p[0]) );
|
CV_DbgAssert( y == 0 || (data && dims >= 1 && (unsigned)y < (unsigned)size.p[0]) );
|
||||||
return (const _Tp*)(data + step.p[0]*y);
|
return (const _Tp*)(data + step.p[0]*y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ static void finalizeHdr(Mat& m)
|
|||||||
void Mat::create(int d, const int* _sizes, int _type)
|
void Mat::create(int d, const int* _sizes, int _type)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
CV_Assert(0 <= d && _sizes && d <= CV_MAX_DIM && _sizes);
|
CV_Assert(0 <= d && d <= CV_MAX_DIM && _sizes);
|
||||||
_type = CV_MAT_TYPE(_type);
|
_type = CV_MAT_TYPE(_type);
|
||||||
|
|
||||||
if( data && (d == dims || (d == 1 && dims <= 2)) && _type == type() )
|
if( data && (d == dims || (d == 1 && dims <= 2)) && _type == type() )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user