Changeset - r24516:0dbd28aa2fc4
[Not reviewed]
master
0 2 0
Jonathan G Rennison - 8 years ago 2016-09-05 00:18:09
j.g.rennison@gmail.com
Codechange: Add support for verbose asserts
2 files changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/openttd.cpp
Show inline comments
 
@@ -129,7 +129,7 @@ void CDECL usererror(const char *s, ...)
 
void CDECL error(const char *s, ...)
 
{
 
	va_list va;
 
	char buf[512];
 
	char buf[2048];
 

	
 
	va_start(va, s);
 
	vseprintf(buf, lastof(buf), s, va);
src/stdafx.h
Show inline comments
 
@@ -430,6 +430,9 @@ void NORETURN CDECL error(const char *st
 
/* Asserts are enabled if NDEBUG isn't defined or WITH_ASSERT is defined. */
 
#if !defined(NDEBUG) || defined(WITH_ASSERT)
 
#	define OTTD_ASSERT
 
#	define assert_msg(expression, msg, ...) if (!(expression)) error("Assertion failed at line %i of %s: %s\n\t" msg, __LINE__, __FILE__, #expression, __VA_ARGS__);
 
#else
 
#	define assert_msg(expression, msg, ...)
 
#endif
 

	
 
#if defined(OPENBSD)
0 comments (0 inline, 0 general)