Fixed ASSERT and ASSERT_MSG macros in Release configuration

This commit is contained in:
Kernell 2015-12-28 22:39:31 +03:00
parent d8acda6a8e
commit 3b7b5190a2

View File

@ -52,9 +52,13 @@ extern "C"
#define SAFE_DELETE(p) { if(p) { delete (p); (p)=nullptr; } } #define SAFE_DELETE(p) { if(p) { delete (p); (p)=nullptr; } }
#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=nullptr; } } #define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=nullptr; } }
#ifdef _DEBUG
#define ASSERT(_Expression) (void)( (!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression), _CRT_WIDE(__FILE__), __LINE__), 0) ) #define ASSERT(_Expression) (void)( (!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression), _CRT_WIDE(__FILE__), __LINE__), 0) )
#define ASSERT_MSG(_Expression, _Message) (void)( (!!(_Expression)) || (_wassert(_CRT_WIDE(_Message), _CRT_WIDE(__FILE__), __LINE__), 0) ) #define ASSERT_MSG(_Expression, _Message) (void)( (!!(_Expression)) || (_wassert(_CRT_WIDE(_Message), _CRT_WIDE(__FILE__), __LINE__), 0) )
#else
#define ASSERT(_Expression) ((void)0)
#define ASSERT_MSG(_Expression, _Message) ((void)0)
#endif
#include "extra/Vector2.h" #include "extra/Vector2.h"
#include "extra/Vector3.h" #include "extra/Vector3.h"