- 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
This commit is contained in:
Colin Finck 2008-02-27 14:57:47 +00:00
parent 2233f3c7cc
commit 0e419d44d8
2 changed files with 10 additions and 15 deletions

View file

@ -1,7 +1,9 @@
#ifndef __CHARMAP_PRECOMP_H
#define __CHARMAP_PRECOMP_H
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <commctrl.h>
#include "resource.h"

View file

@ -160,21 +160,14 @@ extern "C" {
#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);}