diff --git a/ApplicationCode/Application/Tools/RiaLogging.cpp b/ApplicationCode/Application/Tools/RiaLogging.cpp index 51f92c9b40..96c54d78be 100644 --- a/ApplicationCode/Application/Tools/RiaLogging.cpp +++ b/ApplicationCode/Application/Tools/RiaLogging.cpp @@ -23,6 +23,10 @@ #ifdef WIN32 #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 #pragma warning (pop) #else diff --git a/Fwk/AppFwk/cafUserInterface/cafMemoryInspector.cpp b/Fwk/AppFwk/cafUserInterface/cafMemoryInspector.cpp index 8499376d50..b766d8666a 100644 --- a/Fwk/AppFwk/cafUserInterface/cafMemoryInspector.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafMemoryInspector.cpp @@ -6,6 +6,10 @@ #include #ifdef _WIN32 +// 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" #include "psapi.h" #elif defined (__linux__) diff --git a/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp b/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp index 8cd8a121dd..2eb855f639 100644 --- a/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp +++ b/Fwk/AppFwk/cafUserInterface/cafProgressInfo.cpp @@ -369,6 +369,10 @@ namespace caf { #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 #pragma warning (pop) #endif