File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
modules/wechat_qrcode/src/zxing Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 11
11
#ifndef __ZXING_ZXING_HPP__
12
12
#define __ZXING_ZXING_HPP__
13
13
14
+ #include " opencv2/core/fast_math.hpp"
14
15
15
16
#define COUNTER_TYPE short
16
17
@@ -54,14 +55,8 @@ typedef unsigned char boolean;
54
55
#include < cmath>
55
56
56
57
namespace zxing {
57
- inline bool isnan (float v) {
58
- union { float v; uint32_t x; } u = { v };
59
- return (u.x & 0x7fffffffu ) > 0x7f800000u ;
60
- }
61
- inline bool isnan (double v) {
62
- union { double v; uint64_t x; } u = { v };
63
- return (u.x & ~0x8000000000000000uLL) > 0x7ff0000000000000uLL;
64
- }
58
+ inline bool isnan (float v) { return cvIsNaN (v); }
59
+ inline bool isnan (double v) { return cvIsNaN (v); }
65
60
inline float nan () { return std::numeric_limits<float >::quiet_NaN (); }
66
61
} // namespace zxing
67
62
You can’t perform that action at this time.
0 commit comments