From 93c5300fc5cf8041b4e57eac0c714d5f55a6ed8b Mon Sep 17 00:00:00 2001 From: smatz Date: Wed, 1 Jul 2009 21:29:03 +0000 Subject: (svn r16715) -Codechange: add attribute to assert_compile(), so it doesn't warn when used inside function --- src/saveload/saveload.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/saveload/saveload.cpp') diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 1ac00f7ab..46c6104e6 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -1498,11 +1498,10 @@ static size_t ReferenceToInt(const void *obj, SLRefType rt) * @param rt SLRefType type of the object the pointer is sought of * @return Return the index converted to a pointer of any type */ - -assert_compile(sizeof(size_t) <= sizeof(void *)); - static void *IntToReference(size_t index, SLRefType rt) { + assert_compile(sizeof(size_t) <= sizeof(void *)); + assert(_sl.action == SLA_PTRS); /* After version 4.3 REF_VEHICLE_OLD is saved as REF_VEHICLE, -- cgit v1.2.3-54-g00ecf