Browse Source

Bugfix for MSVC 17.8, limits.h doesn't include corecrt.h (#759)

This results in __STDC_WANT_SECURE_LIB__ not being defined and a compile error.
float.h does include corecrt.h so we now include that first to work around the error.
Jorrit Rouwe 1 year ago
parent
commit
d4c4cffb53
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Jolt/Core/Core.h

+ 3 - 3
Jolt/Core/Core.h

@@ -372,6 +372,9 @@
 	JPH_SUPPRESS_WARNING_POP
 
 // Standard C++ includes
+#include <float.h>
+#include <limits.h>
+#include <string.h>
 JPH_SUPPRESS_WARNINGS_STD_BEGIN
 #include <vector>
 #include <utility>
@@ -381,9 +384,6 @@ JPH_SUPPRESS_WARNINGS_STD_BEGIN
 #include <algorithm>
 #include <cstdint>
 JPH_SUPPRESS_WARNINGS_STD_END
-#include <limits.h>
-#include <float.h>
-#include <string.h>
 #if defined(JPH_USE_SSE)
 	#include <immintrin.h>
 #elif defined(JPH_USE_NEON)