From ecad915001c3d9731aaa868d72a39535fa98a009 Mon Sep 17 00:00:00 2001 From: David Williams Date: Wed, 26 Dec 2012 20:18:46 +0000 Subject: [PATCH] Tidied up some code. --- .../include/PolyVoxCore/Impl/ErrorHandling.h | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/Impl/ErrorHandling.h b/library/PolyVoxCore/include/PolyVoxCore/Impl/ErrorHandling.h index 569802c2..b4efd2f9 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Impl/ErrorHandling.h +++ b/library/PolyVoxCore/include/PolyVoxCore/Impl/ErrorHandling.h @@ -69,27 +69,27 @@ freely, subject to the following restrictions: #endif -namespace PolyVox -{ #if defined(HAS_CXX11_STATIC_ASSERT) //In this case we can just use static_assert -#define POLYVOX_STATIC_ASSERT static_assert + #define POLYVOX_STATIC_ASSERT static_assert #else - // empty default template - template - struct StaticAssert {}; - - // template specialized on true - template <> - struct StaticAssert + namespace PolyVox { - // If the static assertion is failing then this function won't exist. It will then - // appear in the error message which gives a clue to the user about what is wrong. - static void ERROR_The_static_assertion_has_failed() {} - }; + // empty default template + template + struct StaticAssert {}; + + // template specialized on true + template <> + struct StaticAssert + { + // If the static assertion is failing then this function won't exist. It will then + // appear in the error message which gives a clue to the user about what is wrong. + static void ERROR_The_static_assertion_has_failed() {} + }; + } #define POLYVOX_STATIC_ASSERT(condition, message) StaticAssert<(condition)>::ERROR_The_static_assertion_has_failed(); #endif -} #endif //__PolyVox_ErrorHandling_H__