From 00ba0c93a5c8287db437fffebece9984d436532d Mon Sep 17 00:00:00 2001 From: TokyoSU <77746747+TokyoSU@users.noreply.github.com> Date: Tue, 5 Jul 2022 18:18:19 +0200 Subject: [PATCH] Fixed warning for GCC on visual studio --- include/raymath.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/raymath.hpp b/include/raymath.hpp index dc3b50c..d712745 100644 --- a/include/raymath.hpp +++ b/include/raymath.hpp @@ -11,11 +11,15 @@ extern "C" { #ifndef RAYMATH_STATIC_INLINE #define RAYMATH_STATIC_INLINE #endif -#pragma GCC diagnostic push +#ifdef __GNUC__ +#pragma GCC diagnostic push // these throw a warning on visual studio, need to check if __GNUC__ is defined to use it. #pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif #include "raymath.h" // NOLINT +#ifdef __GNUC__ #pragma GCC diagnostic pop #endif +#endif #ifdef __cplusplus } #endif