From 00e91fd3d0b9f271ad61cf50a6840c0c4af488ea Mon Sep 17 00:00:00 2001 From: Piotr Semenov Date: Thu, 10 Mar 2016 11:58:32 +0300 Subject: [PATCH] Fix that corrects the OpenCV's random access iterator distance: d(x,y) = -d(y,x) --- modules/core/src/matrix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/matrix.cpp b/modules/core/src/matrix.cpp index 8e32b0f..57abffc 100644 --- a/modules/core/src/matrix.cpp +++ b/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(b.elemSize); return b.lpos() - a.lpos(); } -- 2.7.4