From 92b6fd694458698089d91c64c70cbe34600a7e70 Mon Sep 17 00:00:00 2001 From: Dmitry Novikov Date: Fri, 12 May 2017 00:06:45 +0300 Subject: [PATCH] Add WIN32_LEAN_AND_MEAN to prevent tons of unused windows definitions from headers. (#470) --- rehlds/HLTV/common/DemoFile.h | 1 - rehlds/HLTV/common/NetAddress.h | 2 -- rehlds/common/TextConsoleWin32.h | 1 + rehlds/dedicated/src/precompiled.h | 1 + rehlds/game_shared/counter.h | 1 + rehlds/public/rehlds/osconfig.h | 1 + rehlds/rehlds/jitasm.h | 1 + 7 files changed, 5 insertions(+), 3 deletions(-) diff --git a/rehlds/HLTV/common/DemoFile.h b/rehlds/HLTV/common/DemoFile.h index 0de1772..dd3cee8 100644 --- a/rehlds/HLTV/common/DemoFile.h +++ b/rehlds/HLTV/common/DemoFile.h @@ -46,7 +46,6 @@ const int DEMO_PROTOCOL = 5; const int DEMO_STARTUP = 0; // this lump contains startup info needed to spawn into the server const int DEMO_NORMAL = 1; // this lump contains playback info of messages, etc., needed during playback. -#undef PlaySound enum class DemoCmd : unsigned char { Unknown = 0, NoRewind, // startup message diff --git a/rehlds/HLTV/common/NetAddress.h b/rehlds/HLTV/common/NetAddress.h index 874980f..8c7ee18 100644 --- a/rehlds/HLTV/common/NetAddress.h +++ b/rehlds/HLTV/common/NetAddress.h @@ -31,8 +31,6 @@ #include "netadr.h" #include "BitBuffer.h" -#undef SetPort - class NetAddress { public: NetAddress(); diff --git a/rehlds/common/TextConsoleWin32.h b/rehlds/common/TextConsoleWin32.h index dbe6c32..656110e 100644 --- a/rehlds/common/TextConsoleWin32.h +++ b/rehlds/common/TextConsoleWin32.h @@ -28,6 +28,7 @@ #pragma once +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include #include "TextConsole.h" diff --git a/rehlds/dedicated/src/precompiled.h b/rehlds/dedicated/src/precompiled.h index 7029d27..bd9ecee 100644 --- a/rehlds/dedicated/src/precompiled.h +++ b/rehlds/dedicated/src/precompiled.h @@ -24,6 +24,7 @@ #ifdef _WIN32 #include "conproc.h" + #include // timeGetTime #else #include #endif // _WIN32 diff --git a/rehlds/game_shared/counter.h b/rehlds/game_shared/counter.h index aedaf43..0b55e02 100644 --- a/rehlds/game_shared/counter.h +++ b/rehlds/game_shared/counter.h @@ -29,6 +29,7 @@ #pragma once #ifdef _WIN32 + #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include #include #include diff --git a/rehlds/public/rehlds/osconfig.h b/rehlds/public/rehlds/osconfig.h index 3e62ee5..f2810b6 100644 --- a/rehlds/public/rehlds/osconfig.h +++ b/rehlds/public/rehlds/osconfig.h @@ -48,6 +48,7 @@ #include #ifdef _WIN32 // WINDOWS + #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include #include #include // for support IPX diff --git a/rehlds/rehlds/jitasm.h b/rehlds/rehlds/jitasm.h index 7eb43ef..a33113f 100644 --- a/rehlds/rehlds/jitasm.h +++ b/rehlds/rehlds/jitasm.h @@ -74,6 +74,7 @@ #include #if defined(JITASM_WIN) +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include #else #include