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
+2 -2
View File
@@ -183,7 +183,7 @@ bool BmpDecoder::readHeader()
bool BmpDecoder::readData( Mat& img )
{
uchar* data = img.data;
uchar* data = img.ptr();
int step = (int)img.step;
bool color = img.channels() > 1;
uchar gray_palette[256];
@@ -553,7 +553,7 @@ bool BmpEncoder::write( const Mat& img, const std::vector<int>& )
width *= channels;
for( int y = height - 1; y >= 0; y-- )
{
strm.putBytes( img.data + img.step*y, width );
strm.putBytes( img.ptr(y), width );
if( fileStep > width )
strm.putBytes( zeropad, fileStep - width );
}