Fix that corrects the OpenCV's random access iterator distance: d(x,y) = -d(y,x)
This commit is contained in:
parent
a7d28f3b1f
commit
108ddc199a
@ -2474,7 +2474,7 @@ ptrdiff_t operator - (const MatConstIterator& b, const MatConstIterator& a)
|
||||
if( a.m != b.m )
|
||||
return ((size_t)(-1) >> 1);
|
||||
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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user