Fix that corrects the OpenCV's random access iterator distance: d(x,y) = -d(y,x)

pull/6236/head
Piotr Semenov 9 years ago committed by Alexander Alekhin
parent afc62f076a
commit 00e91fd3d0
  1. 2
      modules/core/src/matrix.cpp

@ -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();
}

Loading…
Cancel
Save