From 0150a5fcfdf29849638396f8ad5b6521a3a423a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 12 Sep 2023 15:41:31 +0200 Subject: [PATCH] Math,Trade: prevent collision with near/far defines in windows.h. --- src/Magnum/Math/Frustum.h | 5 +++++ src/Magnum/Trade/CameraData.h | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/Magnum/Math/Frustum.h b/src/Magnum/Math/Frustum.h index 7c1e29bef..9a5f4778b 100644 --- a/src/Magnum/Math/Frustum.h +++ b/src/Magnum/Math/Frustum.h @@ -42,6 +42,11 @@ #include /** @todo remove when planes() is gone */ #endif +#ifdef CORRADE_TARGET_WINDOWS /* I so HATE windef.h */ +#undef near +#undef far +#endif + namespace Magnum { namespace Math { namespace Implementation { diff --git a/src/Magnum/Trade/CameraData.h b/src/Magnum/Trade/CameraData.h index c00ba6ac4..6c27dbed1 100644 --- a/src/Magnum/Trade/CameraData.h +++ b/src/Magnum/Trade/CameraData.h @@ -33,6 +33,11 @@ #include "Magnum/Math/Vector2.h" #include "Magnum/Trade/visibility.h" +#ifdef CORRADE_TARGET_WINDOWS /* I so HATE windef.h */ +#undef near +#undef far +#endif + namespace Magnum { namespace Trade { /**