Several type of formal refactoring:

1. someMatrix.data -> someMatrix.prt()
2. someMatrix.data + someMatrix.step * lineIndex -> someMatrix.ptr( lineIndex )
3. (SomeType*) someMatrix.data -> someMatrix.ptr<SomeType>()
4. someMatrix.data -> !someMatrix.empty() ( or !someMatrix.data -> someMatrix.empty() ) in logical expressions
This commit is contained in:
Adil Ibragimov
2014-08-13 15:08:27 +04:00
parent 30111a786a
commit 8a4a1bb018
134 changed files with 988 additions and 986 deletions

View File

@@ -230,7 +230,7 @@ pyrDown_( const Mat& _src, Mat& _dst, int borderType )
for( int y = 0; y < dsize.height; y++ )
{
T* dst = (T*)(_dst.data + _dst.step*y);
T* dst = _dst.ptr<T>(y);
WT *row0, *row1, *row2, *row3, *row4;
// fill the ring buffer (horizontal convolution and decimation)
@@ -238,7 +238,7 @@ pyrDown_( const Mat& _src, Mat& _dst, int borderType )
{
WT* row = buf + ((sy - sy0) % PD_SZ)*bufstep;
int _sy = borderInterpolate(sy, ssize.height, borderType);
const T* src = (const T*)(_src.data + _src.step*_sy);
const T* src = _src.ptr<T>(_sy);
int limit = cn;
const int* tab = tabL;
@@ -340,8 +340,8 @@ pyrUp_( const Mat& _src, Mat& _dst, int)
for( int y = 0; y < ssize.height; y++ )
{
T* dst0 = (T*)(_dst.data + _dst.step*y*2);
T* dst1 = (T*)(_dst.data + _dst.step*(y*2+1));
T* dst0 = _dst.ptr<T>(y*2);
T* dst1 = _dst.ptr<T>(y*2+1);
WT *row0, *row1, *row2;
if( y*2+1 >= dsize.height )
@@ -352,7 +352,7 @@ pyrUp_( const Mat& _src, Mat& _dst, int)
{
WT* row = buf + ((sy - sy0) % PU_SZ)*bufstep;
int _sy = borderInterpolate(sy*2, dsize.height, BORDER_REFLECT_101)/2;
const T* src = (const T*)(_src.data + _src.step*_sy);
const T* src = _src.ptr<T>(_sy);
if( ssize.width == cn )
{