summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-07-01 21:29:03 +0000
committersmatz <smatz@openttd.org>2009-07-01 21:29:03 +0000
commit93c5300fc5cf8041b4e57eac0c714d5f55a6ed8b (patch)
treeff2e05e25ffed493c169e23c966e3c3e35509636 /src/core
parent76a50ce94dc7c78d76c309d8a639591fed2a2da8 (diff)
downloadopenttd-93c5300fc5cf8041b4e57eac0c714d5f55a6ed8b.tar.xz
(svn r16715) -Codechange: add attribute to assert_compile(), so it doesn't warn when used inside function
Diffstat (limited to 'src/core')
-rw-r--r--src/core/math_func.hpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/math_func.hpp b/src/core/math_func.hpp
index 35e660d88..2088f253c 100644
--- a/src/core/math_func.hpp
+++ b/src/core/math_func.hpp
@@ -116,12 +116,10 @@ static FORCEINLINE T Align(const T x, uint n)
* @return The smallest multiple of n equal or greater than x
* @see Align()
*/
-
-assert_compile(sizeof(size_t) == sizeof(void *));
-
template <typename T>
static FORCEINLINE T *AlignPtr(T *x, uint n)
{
+ assert_compile(sizeof(size_t) == sizeof(void *));
return (T *)Align((size_t)x, n);
}