From df86f0752ab87cb5cc26f2a7df6bf805b508e6fd Mon Sep 17 00:00:00 2001 From: Pavel Rojtberg Date: Wed, 15 Feb 2017 12:18:35 +0100 Subject: [PATCH] add missing casts to _Tp as determinant() always returns double --- modules/core/include/opencv2/core/operations.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/include/opencv2/core/operations.hpp b/modules/core/include/opencv2/core/operations.hpp index 4a4ad9e..f69790f 100644 --- a/modules/core/include/opencv2/core/operations.hpp +++ b/modules/core/include/opencv2/core/operations.hpp @@ -82,7 +82,7 @@ template struct Matx_FastInvOp<_Tp, 2> { bool operator()(const Matx<_Tp, 2, 2>& a, Matx<_Tp, 2, 2>& b, int) const { - _Tp d = determinant(a); + _Tp d = (_Tp)determinant(a); if( d == 0 ) return false; d = 1/d; @@ -137,7 +137,7 @@ template struct Matx_FastSolveOp<_Tp, 2, 1> bool operator()(const Matx<_Tp, 2, 2>& a, const Matx<_Tp, 2, 1>& b, Matx<_Tp, 2, 1>& x, int) const { - _Tp d = determinant(a); + _Tp d = (_Tp)determinant(a); if( d == 0 ) return false; d = 1/d; -- 2.7.4