From abd81b9533c29b175631ffe1555fc5fdb74559a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 19 Jun 2026 17:34:53 +0200 Subject: [PATCH] DebugTools: MSVC U mad? Can't you just work properly for once. --- src/Magnum/DebugTools/ForceRenderer.cpp | 11 +++++++++++ src/Magnum/DebugTools/ObjectRenderer.cpp | 11 +++++++++++ src/Magnum/DebugTools/Test/ForceRendererGLTest.cpp | 11 +++++++++++ src/Magnum/DebugTools/Test/ObjectRendererGLTest.cpp | 11 +++++++++++ 4 files changed, 44 insertions(+) diff --git a/src/Magnum/DebugTools/ForceRenderer.cpp b/src/Magnum/DebugTools/ForceRenderer.cpp index 87410efda..68997cd20 100644 --- a/src/Magnum/DebugTools/ForceRenderer.cpp +++ b/src/Magnum/DebugTools/ForceRenderer.cpp @@ -27,6 +27,17 @@ #define _MAGNUM_NO_DEPRECATED_FORCERENDERER #define _MAGNUM_NO_DEPRECATED_RESOURCEMANAGER +/* This damn joke of a compiler, even the 2022 version, ignores the + _MAGNUM_NO_DEPRECATED_FORCERENDERER macro for some reason, printing the + ForceRenderer.h file deprecation warning here, so I have to work around it + like this. Same in the test and in ObjectRenderer.h and its test, but in + ResourceManager.cpp as well as in doc/snippets/Magnum.cpp the macro works. + What the hell. */ +#include +#ifdef CORRADE_TARGET_MSVC +#define CORRADE_DEPRECATED_FILE(...) +#endif + #include "ForceRenderer.h" #include "Magnum/GL/Mesh.h" diff --git a/src/Magnum/DebugTools/ObjectRenderer.cpp b/src/Magnum/DebugTools/ObjectRenderer.cpp index 57b5d7bb5..ca25ace62 100644 --- a/src/Magnum/DebugTools/ObjectRenderer.cpp +++ b/src/Magnum/DebugTools/ObjectRenderer.cpp @@ -27,6 +27,17 @@ #define _MAGNUM_NO_DEPRECATED_OBJECTRENDERER #define _MAGNUM_NO_DEPRECATED_RESOURCEMANAGER +/* This damn joke of a compiler, even the 2022 version, ignores the + _MAGNUM_NO_DEPRECATED_OBJECTRENDERER macro for some reason, printing the + ObjectRenderer.h file deprecation warning here, so I have to work around it + like this. Same in the test and in ForceRenderer.h and its test, but in + ResourceManager.cpp as well as in doc/snippets/Magnum.cpp the macro works. + What the hell. */ +#include +#ifdef CORRADE_TARGET_MSVC +#define CORRADE_DEPRECATED_FILE(...) +#endif + #include "ObjectRenderer.h" #include "Magnum/DebugTools/ResourceManager.h" diff --git a/src/Magnum/DebugTools/Test/ForceRendererGLTest.cpp b/src/Magnum/DebugTools/Test/ForceRendererGLTest.cpp index 71ec42216..f4c63a868 100644 --- a/src/Magnum/DebugTools/Test/ForceRendererGLTest.cpp +++ b/src/Magnum/DebugTools/Test/ForceRendererGLTest.cpp @@ -27,6 +27,17 @@ #define _MAGNUM_NO_DEPRECATED_FORCERENDERER #define _MAGNUM_NO_DEPRECATED_RESOURCEMANAGER +/* This damn joke of a compiler, even the 2022 version, ignores the + _MAGNUM_NO_DEPRECATED_FORCERENDERER macro for some reason, printing the + ForceRenderer.h file deprecation warning here, so I have to work around it + like this. Same in ForceRenderer.cpp and with ObjectRenderer.h and its test, + but in ResourceManager.cpp as well as in doc/snippets/Magnum.cpp the macro + works. What the hell. */ +#include +#ifdef CORRADE_TARGET_MSVC +#define CORRADE_DEPRECATED_FILE(...) +#endif + #include #include #include diff --git a/src/Magnum/DebugTools/Test/ObjectRendererGLTest.cpp b/src/Magnum/DebugTools/Test/ObjectRendererGLTest.cpp index ae95c3cc4..12a7d0ea7 100644 --- a/src/Magnum/DebugTools/Test/ObjectRendererGLTest.cpp +++ b/src/Magnum/DebugTools/Test/ObjectRendererGLTest.cpp @@ -27,6 +27,17 @@ #define _MAGNUM_NO_DEPRECATED_OBJECTRENDERER #define _MAGNUM_NO_DEPRECATED_RESOURCEMANAGER +/* This damn joke of a compiler, even the 2022 version, ignores the + _MAGNUM_NO_DEPRECATED_OBJECTRENDERER macro for some reason, printing the + ObjectRenderer.h file deprecation warning here, so I have to work around it + like this. Same in ObjectRenderer.cpp and with ForceRenderer.h and its test, + but in ResourceManager.cpp as well as in doc/snippets/Magnum.cpp the macro + works. What the hell. */ +#include +#ifdef CORRADE_TARGET_MSVC +#define CORRADE_DEPRECATED_FILE(...) +#endif + #include #include #include