mirror of
https://github.com/dhewm/dhewm3-sdk.git
synced 2024-11-21 12:11:07 +00:00
Fix MSVC non-Release builds (_alloca()/assert() didn't play nice)
This commit is contained in:
parent
c6d780b21b
commit
b3558f550d
1 changed files with 2 additions and 1 deletions
|
@ -125,7 +125,8 @@ int IntForSixtets( byte *in );
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
void AssertFailed( const char *file, int line, const char *expression );
|
void AssertFailed( const char *file, int line, const char *expression );
|
||||||
#undef assert
|
#undef assert
|
||||||
#define assert( X ) if ( X ) { } else AssertFailed( __FILE__, __LINE__, #X )
|
// DG: change assert to use ?: so I can use it in _alloca()/_alloca16() (MSVC didn't like if() in there)
|
||||||
|
#define assert( X ) (X) ? 1 : (AssertFailed( __FILE__, __LINE__, #X ), 0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class idException {
|
class idException {
|
||||||
|
|
Loading…
Reference in a new issue