diff --git a/modules/wechat_qrcode/src/zxing/zxing.hpp b/modules/wechat_qrcode/src/zxing/zxing.hpp index 76efae22c87..d735c830f2f 100644 --- a/modules/wechat_qrcode/src/zxing/zxing.hpp +++ b/modules/wechat_qrcode/src/zxing/zxing.hpp @@ -11,6 +11,7 @@ #ifndef __ZXING_ZXING_HPP__ #define __ZXING_ZXING_HPP__ +#include "opencv2/core/fast_math.hpp" #define COUNTER_TYPE short @@ -54,8 +55,8 @@ typedef unsigned char boolean; #include namespace zxing { -inline bool isnan(float v) { return std::isnan(v); } -inline bool isnan(double v) { return std::isnan(v); } +inline bool isnan(float v) { return (bool)cvIsNaN(v); } +inline bool isnan(double v) { return (bool)cvIsNaN(v); } inline float nan() { return std::numeric_limits::quiet_NaN(); } } // namespace zxing