From 77d3eda4f061c39ed9e922f9f46177c8728dc0f7 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 26 Apr 2022 11:38:51 +0200 Subject: Fixed compilation under CMake generated makefiles with Emscripten There is an issue with cmath vs math.h guards that caused some problems. Additionally, I had to tweak guards in alltypes.h and __stddef_max_align_t.h in emscripten sysroot/clang. --- KeyboardController.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/KeyboardController.cpp b/KeyboardController.cpp index cae86f7..15ed1ff 100644 --- a/KeyboardController.cpp +++ b/KeyboardController.cpp @@ -1,11 +1,11 @@ #include "KeyboardController.h" -#include +#include #include -static const float DIAGONAL {std::sin(static_cast(M_PI) / 4.0f)}; +static const float DIAGONAL {static_cast(sin(static_cast(M_PI) / 4.0f))}; static int check_axis(int negative_key, int positive_key, int last); -- cgit v1.1