Merge pull request #3490 from Konano:patch-4

Fix(wechat_code): Modify isnan for compatibility with -ffast_math. #3490

fix #3150
Merge with https://github.com/opencv/opencv/pull/23881

Reference: https://stackoverflow.com/questions/7263404/mingw32-stdisnan-with-ffast-math

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
pull/3790/head
Nano 2 weeks ago committed by GitHub
parent f5f421628b
commit 1aab1f3481
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      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 <cmath>
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<float>::quiet_NaN(); }
} // namespace zxing

Loading…
Cancel
Save