mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-30 23:43:10 +00:00
COMMON: Move definition of math constants to scummsys header.
This should have no effect on common/math.h as scummsys is included at the top anyway, but this will fix compilation on some toolchains when strict ANSI language compliance is enabled i.e. -std=c++11, rather than -std=gnu11. This causes an issue as a side effect is to set a guard which disables various non-standard defines in the system headers i.e. the M_PI and M_SQRT1_2 constant definitions in the MinGW x86_64 toolchain on buildbot. By moving this into scummsys.h after the point of system math.h inclusion, we can ensure that M_PI etc. are always present.
This commit is contained in:
parent
1809cc5673
commit
26a9b528da
@ -52,14 +52,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef M_SQRT1_2
|
||||
#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
|
||||
#endif
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
#ifndef FLT_MIN
|
||||
#define FLT_MIN 1E-37
|
||||
#endif
|
||||
|
@ -144,6 +144,14 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef M_SQRT1_2
|
||||
#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
|
||||
#endif
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
// Include our C++11 compatability header for pre-C++11 compilers.
|
||||
#if __cplusplus < 201103L
|
||||
#include "common/c++11-compat.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user