diff --git a/modules/core/src/matrix.cpp b/modules/core/src/matrix.cpp index 8e32b0fbe..57abffc3c 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(); }