Merge pull request #6236 from alalek:backport_6232

This commit is contained in:
Vadim Pisarevsky 2016-03-12 16:38:56 +00:00
commit 93c4dfb16d

View File

@ -3439,7 +3439,7 @@ ptrdiff_t operator - (const MatConstIterator& b, const MatConstIterator& a)
if( a.m != b.m )
return INT_MAX;
if( a.sliceEnd == b.sliceEnd )
return (b.ptr - a.ptr)/b.elemSize;
return (b.ptr - a.ptr)/static_cast<ptrdiff_t>(b.elemSize);
return b.lpos() - a.lpos();
}