(svn r11611) -Codechange: it is now possible to use a define to enable asserts and show them in crash.log for MSVC release builds

This commit is contained in:
glx
2007-12-09 21:20:21 +00:00
parent 46c0edc80b
commit 6a83f9141b
4 changed files with 20 additions and 2 deletions

View File

@@ -207,6 +207,13 @@
#define strcasecmp stricmp
#define strncasecmp strnicmp
#endif
void SetExceptionString(const char* s, ...);
#if defined(NDEBUG) && defined(WITH_ASSERT)
#undef assert
#define assert(expression) if (!(expression)) { SetExceptionString("Assertion failed at %s:%d: %s", __FILE__, __LINE__, #expression); *(byte*)0 = 0; }
#endif
#endif /* defined(_MSC_VER) */
#if defined(WINCE)