From 63c308a968ff4febdb55f29bc5d9526a0af1c98f Mon Sep 17 00:00:00 2001 From: Bellaktris Date: Fri, 12 Sep 2014 06:08:58 +0700 Subject: [PATCH] error fix --- modules/xphoto/src/norm2.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/xphoto/src/norm2.hpp b/modules/xphoto/src/norm2.hpp index 50a9f5e05..027e522da 100644 --- a/modules/xphoto/src/norm2.hpp +++ b/modules/xphoto/src/norm2.hpp @@ -54,13 +54,15 @@ template struct int_const { // integral_constant typedef int_const ttype; // true_type typedef int_const ftype; // false_type -template struct same_as : ftype {}; -template struct same_as : ttype {}; // is_same - +template struct same_as : ftype {}; +template struct same_as : ttype {}; // is_same template struct is_norm2_type : - int_const::value> {}; + int_const::value + && !same_as<_Tp, uchar>::value + && !same_as<_Tp, ushort>::value + && !same_as<_Tp, uint>::value>{}; template 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); }