diff options
| author | jacob1 <jfu614@gmail.com> | 2012-09-04 00:09:53 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-09-06 23:52:56 (GMT) |
| commit | f8f70a3f770b6cbc1e9c182572317c0968af718b (patch) | |
| tree | 03e94654817ce2c944bcc75f484313331e2daf9d /src/Config.h | |
| parent | 58fa3dd539ad0ee7ebb44ec68515bdc22956c095 (diff) | |
| download | powder-f8f70a3f770b6cbc1e9c182572317c0968af718b.zip powder-f8f70a3f770b6cbc1e9c182572317c0968af718b.tar.gz | |
Visual studio compatibility
This removes some inlines when using visual studio to compile, uisng TPT_NO_INLINE. It also fixes many other problems visual studio has with the code
Diffstat (limited to 'src/Config.h')
| -rw-r--r-- | src/Config.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/Config.h b/src/Config.h index 50a716a..a0e5dfe 100644 --- a/src/Config.h +++ b/src/Config.h @@ -181,18 +181,20 @@ extern unsigned char ZSIZE; #ifdef WIN #define strcasecmp stricmp -#endif -#if defined(WIN) && !defined(__GNUC__) -#define fmin min -#define fminf min -#define fmax max -#define fmaxf max +#endif //_MSC_VER +#if defined(_MSC_VER) +#define fmin(a,b) (((a) < (b)) ? (a) : (b)) +#define fminf(a,b) (((a) < (b)) ? (a) : (b)) +#define fmax(a,b) (((a) > (b)) ? (a) : (b)) +#define fmaxf(a,b) (((a) > (b)) ? (a) : (b)) #endif -#if defined(WIN) && !defined(__GNUC__) +#if defined(_MSC_VER) #define TPT_INLINE _inline +#define TPT_NO_INLINE //Remove inlines in visual studio, but only the ones that don't work #else #define TPT_INLINE inline +#define TPT_NO_INLINE inline #endif #define SDEUT |
