Merge pull request #700 from cxd4/mini-max-olololol

[N-Rage] undeclared functions min() and max()
This commit is contained in:
zilmar 2015-10-28 11:11:22 +11:00
commit 13946543c8
1 changed files with 12 additions and 0 deletions

View File

@ -170,4 +170,16 @@ typedef struct _ADAPTOIDPAK
bool fRumblePak;
} ADAPTOIDPAK, *LPADAPTOIDPAK;
/*
* <windef.h> from under <windows.h> with MSVC defines these macros.
* For some reason, they are unavailable with MinGW's copy of <windows.h>.
*/
#ifndef max
#define max(a, b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef min
#define min(a, b) (((a) < (b)) ? (a) : (b))
#endif
#endif // #ifndef _PAKIO_H_