[ros-diffs] [cfinck] 32513: - 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)

cfinck at svn.reactos.org cfinck at svn.reactos.org
Wed Feb 27 15:57:47 CET 2008


Author: cfinck
Date: Wed Feb 27 17:57:47 2008
New Revision: 32513

URL: http://svn.reactos.org/svn/reactos?rev=32513&view=rev
Log:
- 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)

Modified:
    trunk/reactos/base/applications/charmap/precomp.h
    trunk/reactos/include/psdk/windef.h

Modified: trunk/reactos/base/applications/charmap/precomp.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/charmap/precomp.h?rev=32513&r1=32512&r2=32513&view=diff
==============================================================================
--- trunk/reactos/base/applications/charmap/precomp.h (original)
+++ trunk/reactos/base/applications/charmap/precomp.h Wed Feb 27 17:57:47 2008
@@ -1,7 +1,9 @@
 #ifndef __CHARMAP_PRECOMP_H
 #define __CHARMAP_PRECOMP_H
+
+#include <stdio.h>
+#include <stdlib.h>
 #include <windows.h>
-#include <stdio.h>
 #include <commctrl.h>
 #include "resource.h"
 

Modified: trunk/reactos/include/psdk/windef.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/windef.h?rev=32513&r1=32512&r2=32513&view=diff
==============================================================================
--- trunk/reactos/include/psdk/windef.h (original)
+++ trunk/reactos/include/psdk/windef.h Wed Feb 27 17:57:47 2008
@@ -160,21 +160,14 @@
 #endif
 #endif
 
-#if defined(_MSC_VER) && defined(__cplusplus)
-
-#include <stdlib.h>
-#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);}




More information about the Ros-diffs mailing list