summaryrefslogtreecommitdiff
path: root/core/math
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-03-11 21:01:02 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-03-11 21:44:56 +0100
commit1c2f2a805d99c92e0a8b72dae462018b0bd277c4 (patch)
tree634f3dd798c04f9c8cb9e6b4df451e65f0169dac /core/math
parent5b97db325ac487e4d4f27686b70fa3d4fe6eb181 (diff)
typedefs: Cleanup unused macros and unnecessary checks
We now require a compiler with C++17 support, so we don't need to check for features added to GCC 5 or Clang 3.2. Clang builtin availability checks were unused anyway as Clang defines `__GNUC__` as it's also a GNU C implementation. Fixes #36986.
Diffstat (limited to 'core/math')
-rw-r--r--core/math/random_pcg.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/math/random_pcg.h b/core/math/random_pcg.h
index ac65ce3509..8fd5a056fa 100644
--- a/core/math/random_pcg.h
+++ b/core/math/random_pcg.h
@@ -37,10 +37,10 @@
#include "thirdparty/misc/pcg.h"
-#if defined(__GNUC__) || (_llvm_has_builtin(__builtin_clz))
+#if defined(__GNUC__)
#define CLZ32(x) __builtin_clz(x)
#elif defined(_MSC_VER)
-#include "intrin.h"
+#include <intrin.h>
static int __bsr_clz32(uint32_t x) {
unsigned long index;
_BitScanReverse(&index, x);
@@ -50,11 +50,11 @@ static int __bsr_clz32(uint32_t x) {
#else
#endif
-#if defined(__GNUC__) || (_llvm_has_builtin(__builtin_ldexp) && _llvm_has_builtin(__builtin_ldexpf))
+#if defined(__GNUC__)
#define LDEXP(s, e) __builtin_ldexp(s, e)
#define LDEXPF(s, e) __builtin_ldexpf(s, e)
#else
-#include "math.h"
+#include <math.h>
#define LDEXP(s, e) ldexp(s, e)
#define LDEXPF(s, e) ldexp(s, e)
#endif