From cc0c3988d10e57cc4892b6b1ef02809da4021833 Mon Sep 17 00:00:00 2001 From: janwas Date: Tue, 2 Feb 2010 13:57:52 +0000 Subject: [PATCH] build fixes This was SVN commit r7300. --- source/lib/code_annotation.h | 13 +++++-------- source/lib/timer.h | 4 ++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/source/lib/code_annotation.h b/source/lib/code_annotation.h index 3ae0df1ab6..5b03f874d6 100644 --- a/source/lib/code_annotation.h +++ b/source/lib/code_annotation.h @@ -127,15 +127,12 @@ switch(x % 2) * * @param expression that is expected to evaluate to non-zero at compile-time. **/ -#define cassert(expr) typedef detail::static_assert_<(expr)>::type UID__ -namespace detail +#define cassert(expr) typedef static_assert_<(expr)>::type UID__ +template struct static_assert_; +template<> struct static_assert_ { - template struct static_assert_; - template<> struct static_assert_ - { - typedef int type; - }; -} + typedef int type; +}; /** * compile-time debug_assert. causes a compile error if the expression diff --git a/source/lib/timer.h b/source/lib/timer.h index 84344cae66..3365871039 100644 --- a/source/lib/timer.h +++ b/source/lib/timer.h @@ -294,7 +294,7 @@ LIB_API TimerClient* timer_AddClient(TimerClient* tc, const wchar_t* description **/ #define TIMER_ADD_CLIENT(id)\ static TimerClient UID__;\ - static TimerClient* id = timer_AddClient(&UID__, WIDEN(#id)); + static TimerClient* id = timer_AddClient(&UID__, WIDEN(#id)) /** * bill the difference between t0 and t1 to the client's total. @@ -339,7 +339,7 @@ private: * a string literal is safest. * * Example usage: - * TIMER_ADD_CLIENT(identifier) + * TIMER_ADD_CLIENT(identifier); * * void func() * {