Skip to content

Commit

Permalink
Merge pull request #3705 from vrabaud:cpp
Browse files Browse the repository at this point in the history
Use proper C++ types again.
asmorkalov authored Mar 26, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents c8c750a + 9edb0ce commit 0810cfb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/xphoto/src/norm2.hpp
Original file line number Diff line number Diff line change
@@ -59,10 +59,10 @@ template <class T> struct same_as<T, T> : ttype {}; // is_same


template <typename _Tp> struct is_norm2_type :
int_const<bool, !same_as<_Tp, char>::value
int_const<bool, !same_as<_Tp, int8_t>::value
&& !same_as<_Tp, uint8_t>::value
&& !same_as<_Tp, ushort>::value
&& !same_as<_Tp, uint>::value>{};
&& !same_as<_Tp, uint16_t>::value
&& !same_as<_Tp, uint32_t>::value>{};

template <typename _Tp, int cn> static inline typename iftype< is_norm2_type<_Tp>::value, _Tp >::
type norm2(cv::Vec<_Tp, cn> a, cv::Vec<_Tp, cn> b) { return (a - b).dot(a - b); }

0 comments on commit 0810cfb

Please sign in to comment.