From fff80cd2488899a322f9e673930a00eb9ab5b165 Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 5 Jan 2023 19:36:10 +0000 Subject: [PATCH 1/2] random: remove windows-only compat.h include in randomenv Note that this was probably only here to indirectly receive windows.h via another include in compat.h (windows.h or winreg.h aren't included there). Also note that compat.h is already pulled in here for everyone via util/time.h, so including inside a windows only ifdef is secondarily redundant. --- src/randomenv.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/randomenv.cpp b/src/randomenv.cpp index 0b97d747cb2..5b5b7c078d3 100644 --- a/src/randomenv.cpp +++ b/src/randomenv.cpp @@ -15,7 +15,8 @@ #include #include // for GetTime() #ifdef WIN32 -#include +#include +#include #endif #include From b358bde020e2b9f6249fdbc500db6cb30f500f19 Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 5 Jan 2023 19:40:39 +0000 Subject: [PATCH 2/2] randomenv: consolidate WIN32 #ifdefs Order includes. Remove // for xyz comments --- src/randomenv.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/randomenv.cpp b/src/randomenv.cpp index 5b5b7c078d3..8c00ffb818c 100644 --- a/src/randomenv.cpp +++ b/src/randomenv.cpp @@ -13,22 +13,21 @@ #include #include #include -#include // for GetTime() -#ifdef WIN32 -#include -#include -#endif +#include #include #include +#include +#include #include #include #include #include -#include -#include -#ifndef WIN32 +#ifdef WIN32 +#include +#include +#else #include // must go before a number of other headers #include #include