diff options
| author | Stefan Boberg <[email protected]> | 2021-10-15 16:29:38 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-10-15 16:29:38 +0200 |
| commit | bb258b7bf62c5021d2ccde38107efcfdfc52ddd0 (patch) | |
| tree | 6d641ac4ecc04373e19a9c80776a47ba5b590eaf /zencore/include | |
| parent | zencore: added ZEN_THIRD_PARTY_INCLUDES_START/ZEN_THIRD_PARTY_INCLUDES_END (diff) | |
| download | zen-bb258b7bf62c5021d2ccde38107efcfdfc52ddd0.tar.xz zen-bb258b7bf62c5021d2ccde38107efcfdfc52ddd0.zip | |
zencore: Enabled MSC warning 4668 to get warnings when preprocessor macros are used without an explicit definition
Also fixed up various code to compile with this, by using ZEN_THIRD_PARTY_INCLUDES_START/ZEN_THIRD_PARTY_INCLUDES_END macros
Removed prewindows.h/postwindows.h since they are no longer to be used due to the above
Diffstat (limited to 'zencore/include')
| -rw-r--r-- | zencore/include/zencore/fmtutils.h | 4 | ||||
| -rw-r--r-- | zencore/include/zencore/logging.h | 8 | ||||
| -rw-r--r-- | zencore/include/zencore/postwindows.h | 3 | ||||
| -rw-r--r-- | zencore/include/zencore/prewindows.h | 1 | ||||
| -rw-r--r-- | zencore/include/zencore/windows.h | 5 | ||||
| -rw-r--r-- | zencore/include/zencore/zencore.h | 1 |
6 files changed, 11 insertions, 11 deletions
diff --git a/zencore/include/zencore/fmtutils.h b/zencore/include/zencore/fmtutils.h index 29e2ae78a..7e60c2bef 100644 --- a/zencore/include/zencore/fmtutils.h +++ b/zencore/include/zencore/fmtutils.h @@ -6,7 +6,11 @@ #include <zencore/string.h> #include <zencore/uid.h> + +ZEN_THIRD_PARTY_INCLUDES_START #include <fmt/format.h> +ZEN_THIRD_PARTY_INCLUDES_END + #include <filesystem> #include <string_view> diff --git a/zencore/include/zencore/logging.h b/zencore/include/zencore/logging.h index 0838cfe80..5a038dd3c 100644 --- a/zencore/include/zencore/logging.h +++ b/zencore/include/zencore/logging.h @@ -2,11 +2,11 @@ #pragma once -// clang-format off -#include "prewindows.h" +#include <zencore/zencore.h> + +ZEN_THIRD_PARTY_INCLUDES_START #include <spdlog/spdlog.h> -#include "postwindows.h" -// clang-format on +ZEN_THIRD_PARTY_INCLUDES_END #include <string_view> diff --git a/zencore/include/zencore/postwindows.h b/zencore/include/zencore/postwindows.h deleted file mode 100644 index 35b7db3af..000000000 --- a/zencore/include/zencore/postwindows.h +++ /dev/null @@ -1,3 +0,0 @@ -// Copyright Epic Games, Inc. All Rights Reserved. - -#undef GetObject diff --git a/zencore/include/zencore/prewindows.h b/zencore/include/zencore/prewindows.h deleted file mode 100644 index 0bc74e49b..000000000 --- a/zencore/include/zencore/prewindows.h +++ /dev/null @@ -1 +0,0 @@ -// Copyright Epic Games, Inc. All Rights Reserved. diff --git a/zencore/include/zencore/windows.h b/zencore/include/zencore/windows.h index 2b6dc4839..621621ae8 100644 --- a/zencore/include/zencore/windows.h +++ b/zencore/include/zencore/windows.h @@ -2,7 +2,7 @@ #pragma once -#include "prewindows.h" +ZEN_THIRD_PARTY_INCLUDES_START struct IUnknown; // Workaround for "combaseapi.h(229): error C2187: syntax error: 'identifier' was unexpected here" when using /permissive- #ifndef NOMINMAX @@ -10,5 +10,6 @@ struct IUnknown; // Workaround for "combaseapi.h(229): error C2187: syntax erro #endif #define WIN32_LEAN_AND_MEAN #include <windows.h> +#undef GetObject -#include "postwindows.h" +ZEN_THIRD_PARTY_INCLUDES_END diff --git a/zencore/include/zencore/zencore.h b/zencore/include/zencore/zencore.h index 3367b39ef..d654770d0 100644 --- a/zencore/include/zencore/zencore.h +++ b/zencore/include/zencore/zencore.h @@ -62,7 +62,6 @@ #if ZEN_COMPILER_MSC # pragma warning(disable : 4324) // warning C4324: '<type>': structure was padded due to alignment specifier -# pragma warning(default : 4668) // warning C4668: 'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives' #endif #ifndef ZEN_THIRD_PARTY_INCLUDES_START |