2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 19:44:55 +00:00

Various movement and HUD bug fixes

This commit is contained in:
Jack Andersen
2017-12-18 17:05:50 -10:00
parent 1bb7e882a0
commit 1c44f8d1bc
37 changed files with 84 additions and 62 deletions

View File

@@ -188,8 +188,7 @@ for tp in CENTITY_TYPES:
sourcef.write('''template <class T>
void TCastToPtr<T>::Visit(%s* p)
{
static_assert(sizeof(T) > 0, "TCastToPtr can not cast to incomplete type");
static_assert(!std::is_void<T>::value, "TCastToPtr can not cast to incomplete type");
static_assert(sizeof(T) > 0 && !std::is_void<T>::value, "TCastToPtr can not cast to incomplete type");
ptr = reinterpret_cast<T*>(std::is_convertible<%s*, T*>::value ? p : nullptr);
}