diff options
author | Darkvater <darkvater@openttd.org> | 2005-05-30 22:16:05 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2005-05-30 22:16:05 +0000 |
commit | 55423efb0687d937256d17ad267fce67ed9bf5cf (patch) | |
tree | a128ca9df2fa6efee823ebaf238898eddb20617b /stdafx.h | |
parent | 628b1adbd24e1c0753e91030fb2080ca64340719 (diff) | |
download | openttd-55423efb0687d937256d17ad267fce67ed9bf5cf.tar.xz |
(svn r2387) - CodeChange: made the saveload code more readable and also removed the 'byte' saveload arrays which means you can save an array of more than 255 elements, or bigger structs than 255 bytes. This doesn't yet solve the problem that a chunk can be a maximum of 16384 big.
- Fix: also fix an unnoticed error in SlSaveLoadConv() due to wrong types.
Diffstat (limited to 'stdafx.h')
-rw-r--r-- | stdafx.h | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -72,7 +72,7 @@ //#include <alloca.h> //#include <malloc.h> # define __int64 long long -# define NOT_REACHED() +# define NOT_REACHED() assert(0) # define GCC_PACK __attribute__((packed)) # if (__GNUC__ == 2) @@ -85,7 +85,7 @@ # define NORETURN # define FORCEINLINE inline # define CDECL -# define NOT_REACHED() +# define NOT_REACHED() assert(0) # define GCC_PACK # undef TTD_ALIGNMENT_4 # undef TTD_ALIGNMENT_2 @@ -104,7 +104,11 @@ # define FORCEINLINE __forceinline # define inline _inline # define CDECL _cdecl -# define NOT_REACHED() _assume(0) +# if defined(_DEBUG) +# define NOT_REACHED() assert(0) +# else +# define NOT_REACHED() _assume(0) +# endif int CDECL snprintf(char *str, size_t size, const char *format, ...); int CDECL vsnprintf(char *str, size_t size, const char *format, va_list ap); # undef TTD_ALIGNMENT_4 |