From 8bbe747e8e05bcf8640656a834e85ad0e398a8d0 Mon Sep 17 00:00:00 2001 From: Arseniy Shestakov Date: Sat, 10 Feb 2018 22:15:27 +0300 Subject: [PATCH] Cleanup undef for min / max. NOMINMAX is already in Global.h --- client/CPlayerInterface.h | 7 ------- client/Graphics.cpp | 6 ------ client/windows/GUIClasses.cpp | 3 --- lib/CGameState.cpp | 7 ------- lib/NetPacksLib.cpp | 3 --- server/CGameHandler.cpp | 6 ------ 6 files changed, 32 deletions(-) diff --git a/client/CPlayerInterface.h b/client/CPlayerInterface.h index fa3727b7d..114155e00 100644 --- a/client/CPlayerInterface.h +++ b/client/CPlayerInterface.h @@ -19,13 +19,6 @@ #define sprintf_s snprintf #endif -#ifdef max -#undef max -#endif -#ifdef min -#undef min -#endif - class CButton; class CToggleGroup; struct TryMoveHero; diff --git a/client/Graphics.cpp b/client/Graphics.cpp index f29da89e7..c9e6a848e 100644 --- a/client/Graphics.cpp +++ b/client/Graphics.cpp @@ -33,12 +33,6 @@ #include "../lib/mapObjects/CObjectHandler.h" using namespace CSDL_Ext; -#ifdef min -#undef min -#endif -#ifdef max -#undef max -#endif Graphics * graphics = nullptr; diff --git a/client/windows/GUIClasses.cpp b/client/windows/GUIClasses.cpp index b7f080b1d..cf6d3a47c 100644 --- a/client/windows/GUIClasses.cpp +++ b/client/windows/GUIClasses.cpp @@ -65,9 +65,6 @@ using namespace CSDL_Ext; std::list CFocusable::focusables; CFocusable * CFocusable::inputWithFocus; -#undef min -#undef max - CRecruitmentWindow::CCreatureCard::CCreatureCard(CRecruitmentWindow *window, const CCreature *crea, int totalAmount): CIntObject(LCLICK | RCLICK), parent(window), diff --git a/lib/CGameState.cpp b/lib/CGameState.cpp index 487506b9d..647489180 100644 --- a/lib/CGameState.cpp +++ b/lib/CGameState.cpp @@ -37,13 +37,6 @@ #include "serializer/CMemorySerializer.h" #include "VCMIDirs.h" -#ifdef min -#undef min -#endif -#ifdef max -#undef max -#endif - boost::shared_mutex CGameState::mutex; template class CApplyOnGS; diff --git a/lib/NetPacksLib.cpp b/lib/NetPacksLib.cpp index bade8a3c6..c4b25e44a 100644 --- a/lib/NetPacksLib.cpp +++ b/lib/NetPacksLib.cpp @@ -28,9 +28,6 @@ #include "StartInfo.h" #include "CPlayerState.h" -#undef min -#undef max - DLL_LINKAGE void SetResources::applyGs(CGameState *gs) { diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index fb70d377f..9f1c80f91 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -49,12 +49,6 @@ #include #endif extern std::atomic serverShuttingDown; -#ifdef min -#undef min -#endif -#ifdef max -#undef max -#endif #define COMPLAIN_RET_IF(cond, txt) do {if (cond){complain(txt); return;}} while(0) #define COMPLAIN_RET_FALSE_IF(cond, txt) do {if (cond){complain(txt); return false;}} while(0)