Tidied up some code.
This commit is contained in:
parent
64cd6e31b0
commit
ecad915001
@ -69,12 +69,12 @@ 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
|
||||
#else
|
||||
namespace PolyVox
|
||||
{
|
||||
// empty default template
|
||||
template <bool b>
|
||||
struct StaticAssert {};
|
||||
@ -87,9 +87,9 @@ namespace PolyVox
|
||||
// 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__
|
||||
|
Loading…
x
Reference in New Issue
Block a user