From c5c160870d439eae9e7c95a2d1ffa55ed3481c26 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik <sthalik@misaki.pl> Date: Wed, 12 Dec 2018 00:12:13 +0100 Subject: [PATCH] fix accidental header namespace inclusion --- components/debug/debugging.cpp | 6 ++++++ components/debug/debugging.hpp | 12 +++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/components/debug/debugging.cpp b/components/debug/debugging.cpp index 7aa7a127ae..2d05fbc55b 100644 --- a/components/debug/debugging.cpp +++ b/components/debug/debugging.cpp @@ -2,6 +2,12 @@ #include <components/crashcatcher/crashcatcher.hpp> +#ifdef _WIN32 +# undef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# include <windows.h> +#endif + namespace Debug { #ifdef _WIN32 diff --git a/components/debug/debugging.hpp b/components/debug/debugging.hpp index bf9fbd38c0..81b01d055e 100644 --- a/components/debug/debugging.hpp +++ b/components/debug/debugging.hpp @@ -10,6 +10,12 @@ #include "debuglog.hpp" +#if defined _WIN32 && defined _DEBUG +# undef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# include <windows.h> +#endif + namespace Debug { // ANSI colors for terminal @@ -47,11 +53,7 @@ namespace Debug bool attachParentConsole(); #endif -#if defined(_WIN32) && defined(_DEBUG) -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN 1 -#endif // !WIN32_LEAN_AND_MEAN -#include <Windows.h> +#if defined _WIN32 && defined _DEBUG class DebugOutput : public DebugOutputBase { public: