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

@@ -155,7 +155,7 @@ bool SunRasterDecoder::readHeader()
bool SunRasterDecoder::readData( Mat& img )
{
int color = img.channels() > 1;
uchar* data = img.data;
uchar* data = img.ptr();
int step = (int)img.step;
uchar gray_palette[256];
bool result = false;
@@ -414,7 +414,7 @@ bool SunRasterEncoder::write( const Mat& img, const std::vector<int>& )
strm.putDWord( 0 );
for( y = 0; y < height; y++ )
strm.putBytes( img.data + img.step*y, fileStep );
strm.putBytes( img.ptr(y), fileStep );
strm.close();
result = true;