Unify Windows.h inclusion

Windows.h must be included first and must be included with care
regarding WinSock.h and WinSock2.h affair.

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
2021-11-15 11:50:29 +01:00
parent fc7f9da219
commit 1a8884fcab
4 changed files with 7 additions and 6 deletions

View File

@@ -19,14 +19,15 @@
#pragma once
#ifdef _WIN32
#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h.
#include <Windows.h>
#endif
#include <sal.h>
#include <istream>
#include <ostream>
#include <utility>
#include <vector>
#ifdef _WIN32
#include <Windows.h>
#endif
#pragma warning(push)