diff --git a/modules/wechat_qrcode/src/zxing/zxing.hpp b/modules/wechat_qrcode/src/zxing/zxing.hpp index d735c830f2f..e61f36e8723 100644 --- a/modules/wechat_qrcode/src/zxing/zxing.hpp +++ b/modules/wechat_qrcode/src/zxing/zxing.hpp @@ -55,8 +55,8 @@ typedef unsigned char boolean; #include namespace zxing { -inline bool isnan(float v) { return (bool)cvIsNaN(v); } -inline bool isnan(double v) { return (bool)cvIsNaN(v); } +inline bool isnan(float v) { return cvIsNaN(v) != 0; } +inline bool isnan(double v) { return cvIsNaN(v) != 0; } inline float nan() { return std::numeric_limits::quiet_NaN(); } } // namespace zxing