mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
AppFwk: Move include of windows.h to top of file
The include was located in the middle of a file inside a namespace caf block and lead to ambiguous symbols when compiling with unity build and Qt6. It is also considered good practice to have includes at the top. The pragma warning disable is also removed as the warning seems to be gone (and none of the other windows.h includes have it). Closes #11327
This commit is contained in:
parent
c074033dc2
commit
29d991159b
@ -48,6 +48,14 @@
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Define this one to tell windows.h to not define min() and max() as macros
|
||||
#if defined WIN32 && !defined NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
namespace caf
|
||||
{
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -358,17 +366,6 @@ bool ProgressState::isActive()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4668 )
|
||||
// Define this one to tell windows.h to not define min() and max() as macros
|
||||
#if defined WIN32 && !defined NOMINMAX
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
|
||||
void openDebugWindow()
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
|
Loading…
Reference in New Issue
Block a user