sfm: Fix redefinition error in 32 bit mingw-w64 environment

sincos function is defined by mingw-w64 for both 32 bit and 64 bit environments.
Previously, sincos function was hidden for 64 bit mingw-w64 with __MINGW64__ macro.
This change also hides the sincos definition for 32 bit mingw-w64 with __MINGW32__ macro.
pull/3334/head
Biswapriyo Nath 3 years ago committed by GitHub
parent d85887cd8b
commit 4e4e3c3465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      modules/sfm/src/libmv_light/libmv/numeric/numeric.h

@ -33,7 +33,7 @@
#include <Eigen/QR>
#include <Eigen/SVD>
#if !defined(__MINGW64__)
#if !defined(__MINGW32__)
# if defined(_WIN32) || defined(__APPLE__) || \
defined(__FreeBSD__) || defined(__NetBSD__)
static void sincos(double x, double *sinx, double *cosx) {
@ -41,7 +41,7 @@ static void sincos(double x, double *sinx, double *cosx) {
*cosx = cos(x);
}
# endif
#endif // !__MINGW64__
#endif // !__MINGW32__
#if (defined(_WIN32)) && !defined(__MINGW32__)
inline long lround(double d) {

Loading…
Cancel
Save