From 0e419d44d8096586ed37b06c071bdabe4793e11c Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Wed, 27 Feb 2008 14:57:47 +0000 Subject: [PATCH] - Remove an unneeded MSVC block in windef.h and indent the definition of the "min" and "max" macros - Shuffle the header inclusion order in charmap around, so that it compiles warning-free under MSVC (at /W3) svn path=/trunk/; revision=32513 --- reactos/base/applications/charmap/precomp.h | 4 +++- reactos/include/psdk/windef.h | 21 +++++++-------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/reactos/base/applications/charmap/precomp.h b/reactos/base/applications/charmap/precomp.h index 040886cefd7..c46337f3bb0 100644 --- a/reactos/base/applications/charmap/precomp.h +++ b/reactos/base/applications/charmap/precomp.h @@ -1,7 +1,9 @@ #ifndef __CHARMAP_PRECOMP_H #define __CHARMAP_PRECOMP_H -#include + #include +#include +#include #include #include "resource.h" diff --git a/reactos/include/psdk/windef.h b/reactos/include/psdk/windef.h index 67a061c79aa..ca5f61a29ca 100644 --- a/reactos/include/psdk/windef.h +++ b/reactos/include/psdk/windef.h @@ -160,21 +160,14 @@ extern "C" { #endif #endif -#if defined(_MSC_VER) && defined(__cplusplus) - -#include -#define min __min -#define max __max - -#elif !defined(_MSC_VER) && !defined(NOMINMAX) - -#ifndef max -#define max(a,b) ((a)>(b)?(a):(b)) -#endif -#ifndef min -#define min(a,b) ((a)<(b)?(a):(b)) -#endif +#ifndef NOMINMAX + #ifndef max + #define max(a,b) ((a)>(b)?(a):(b)) + #endif + #ifndef min + #define min(a,b) ((a)<(b)?(a):(b)) + #endif #endif #define UNREFERENCED_PARAMETER(P) {(P)=(P);}