i_tcp_detail: Rearrange header includes to silence warning

winsock2.h contains a preprocessor warning that it must be included before windows.h. This was violated for k_bans.cpp when the new json include was added, but also rearranges i_tcp_detail.h to guarantee no alteration to existing doom-based headings would ever violate this again.
This commit is contained in:
toaster 2025-05-18 15:35:59 +01:00
parent f9e7800d4f
commit 869a103e0e
2 changed files with 6 additions and 5 deletions

View file

@ -40,8 +40,6 @@ extern "C" {
#include <ws2tcpip.h>
#endif
#include "doomdef.h"
#ifdef USE_WINSOCK1
#include <winsock.h>
#else
@ -115,9 +113,11 @@ extern "C" {
static UINT8 UPNP_support = TRUE;
#endif // HAVE_MINIUPNC
#include "d_net.h"
#include "doomtype.h"
#include "i_tcp.h"
#include "d_net.h"
#include "doomdef.h"
#include "doomtype.h"
union mysockaddr_t
{

View file

@ -17,10 +17,11 @@
#include <fmt/format.h>
#include <tcb/span.hpp>
#include "i_tcp_detail.h" // clientaddress
#include "core/json.hpp"
#include "core/string.h"
#include "io/streams.hpp"
#include "i_tcp_detail.h" // clientaddress
#include "k_bans.h"
#include "byteptr.h" // READ/WRITE macros
#include "command.h"