Skip to content

Commit df86f07

Browse files
committed
add missing casts to _Tp as determinant() always returns double
1 parent 1304ad1 commit df86f07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/core/include/opencv2/core/operations.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ template<typename _Tp> struct Matx_FastInvOp<_Tp, 2>
8282
{
8383
bool operator()(const Matx<_Tp, 2, 2>& a, Matx<_Tp, 2, 2>& b, int) const
8484
{
85-
_Tp d = determinant(a);
85+
_Tp d = (_Tp)determinant(a);
8686
if( d == 0 )
8787
return false;
8888
d = 1/d;
@@ -137,7 +137,7 @@ template<typename _Tp> struct Matx_FastSolveOp<_Tp, 2, 1>
137137
bool operator()(const Matx<_Tp, 2, 2>& a, const Matx<_Tp, 2, 1>& b,
138138
Matx<_Tp, 2, 1>& x, int) const
139139
{
140-
_Tp d = determinant(a);
140+
_Tp d = (_Tp)determinant(a);
141141
if( d == 0 )
142142
return false;
143143
d = 1/d;

0 commit comments

Comments
 (0)