Browse Source

Platform: silence Sdl2App warning on <SDL.h>

pull/605/head
Stanislaw Halik 4 years ago
parent
commit
f62a5ca9ea
  1. 7
      src/Magnum/Platform/Sdl2Application.cpp
  2. 7
      src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp

7
src/Magnum/Platform/Sdl2Application.cpp

@ -27,6 +27,10 @@
#include "Sdl2Application.h"
#ifdef CORRADE_TARGET_GCC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
#endif
#ifdef CORRADE_TARGET_CLANG_CL
/* SDL does #pragma pack(push,8) and #pragma pack(pop,8) in different headers
(begin_code.h and end_code.h) and clang-cl doesn't like that, even though it
@ -38,6 +42,9 @@
#ifdef CORRADE_TARGET_CLANG_CL
#pragma clang diagnostic pop
#endif
#ifdef CORRADE_TARGET_GCC
#pragma GCC diagnostic pop
#endif
#ifndef CORRADE_TARGET_EMSCRIPTEN
#include <tuple>
#else

7
src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp

@ -34,6 +34,10 @@
#include "Magnum/Trade/AbstractImporter.h"
#include "Magnum/Trade/ImageData.h"
#ifdef CORRADE_TARGET_GCC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wold-style-cast"
#endif
#ifdef CORRADE_TARGET_CLANG_CL
/* SDL does #pragma pack(push,8) and #pragma pack(pop,8) in different headers
(begin_code.h and end_code.h) and clang-cl doesn't like that, even though it
@ -45,6 +49,9 @@
#ifdef CORRADE_TARGET_CLANG_CL
#pragma clang diagnostic pop
#endif
#ifdef CORRADE_TARGET_GCC
#pragma GCC diagnostic pop
#endif
#ifdef MAGNUM_TARGET_GL
#include "Magnum/GL/DefaultFramebuffer.h"

Loading…
Cancel
Save