Skip to content

Commit

Permalink
Add WIN32_LEAN_AND_MEAN to prevent tons of unused windows definitions…
Browse files Browse the repository at this point in the history
… from headers. (#470)
  • Loading branch information
s1lentq authored May 11, 2017
1 parent 49483d3 commit 92b6fd6
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion rehlds/HLTV/common/DemoFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions rehlds/HLTV/common/NetAddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
#include "netadr.h"
#include "BitBuffer.h"

#undef SetPort

class NetAddress {
public:
NetAddress();
Expand Down
1 change: 1 addition & 0 deletions rehlds/common/TextConsoleWin32.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#pragma once

#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#include "TextConsole.h"

Expand Down
1 change: 1 addition & 0 deletions rehlds/dedicated/src/precompiled.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#ifdef _WIN32
#include "conproc.h"
#include <mmsystem.h> // timeGetTime
#else
#include <signal.h>
#endif // _WIN32
1 change: 1 addition & 0 deletions rehlds/game_shared/counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#pragma once

#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#include <io.h>
#include <direct.h>
Expand Down
1 change: 1 addition & 0 deletions rehlds/public/rehlds/osconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include <functional>

#ifdef _WIN32 // WINDOWS
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#include <winsock.h>
#include <wsipx.h> // for support IPX
Expand Down
1 change: 1 addition & 0 deletions rehlds/rehlds/jitasm.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
#include <string.h>

#if defined(JITASM_WIN)
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#else
#include <unistd.h>
Expand Down

0 comments on commit 92b6fd6

Please sign in to comment.