summaryrefslogtreecommitdiff
path: root/src/stdafx.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-15 13:01:52 +0000
committerrubidium <rubidium@openttd.org>2007-05-15 13:01:52 +0000
commitf9e0d3835b39b0672b0d97553a58dbb73496e029 (patch)
tree25c877607c434741a47ffa5644eace5494ff2cb4 /src/stdafx.h
parent23492f1f34bf45266e319d4f2c7e2ffcb8dc483c (diff)
downloadopenttd-f9e0d3835b39b0672b0d97553a58dbb73496e029.tar.xz
(svn r9842) -Codechange: now NOT_REACHED is also triggered when debugging is disabled.
Diffstat (limited to 'src/stdafx.h')
-rw-r--r--src/stdafx.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/stdafx.h b/src/stdafx.h
index 507c961b7..b86c9b4a4 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -112,7 +112,6 @@
# define FORCEINLINE inline
# define CDECL
# define __int64 long long
-# define NOT_REACHED() assert(0)
# define GCC_PACK __attribute__((packed))
# if (__GNUC__ == 2)
@@ -125,7 +124,6 @@
# define NORETURN
# define FORCEINLINE inline
# define CDECL
-# define NOT_REACHED() assert(0)
# define GCC_PACK
# include <malloc.h>
#endif /* __WATCOMC__ */
@@ -163,11 +161,6 @@
# define FORCEINLINE __forceinline
# define inline _inline
# define CDECL _cdecl
-# if defined(_DEBUG)
-# define NOT_REACHED() assert(0)
-# else
-# define NOT_REACHED() _assume(0)
-# endif /* _DEBUG */
int CDECL snprintf(char *str, size_t size, const char *format, ...);
# if _MSC_VER < 1400
int CDECL vsnprintf(char *str, size_t size, const char *format, va_list ap);
@@ -334,4 +327,7 @@ assert_compile(sizeof(uint8) == 1);
# define Point OTTD_AMIGA_POINT
#endif
+void NORETURN CDECL error(const char *str, ...);
+#define NOT_REACHED() error("NOT_REACHED triggered at line %i of %s", __LINE__, __FILE__)
+
#endif /* STDAFX_H */