1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2026-01-02 19:03:15 +00:00

Fix ScriptFunctionPointer

This commit is contained in:
Phoenix / Hotaru 2023-07-10 10:27:42 +01:00
parent 4763a46364
commit aaffcba79b
No known key found for this signature in database
GPG key ID: 50AE27B713475E99

View file

@ -99,13 +99,9 @@ struct CallbackIdentity
struct ScriptFunctionPointer : public ScriptIdentity
{
void *addr;
#if (!defined(__clang__) && defined(__GNUC__))
template<typename R, typename... Types>
constexpr ScriptFunctionPointer(Function<R, Types...> addr) : ScriptIdentity(addr), addr((void*)(addr)) {}
#else
template<typename R, typename... Types>
constexpr ScriptFunctionPointer(Function<R, Types...> addr) : ScriptIdentity(addr), addr(addr) {}
#endif
constexpr ScriptFunctionPointer(Function<R, Types...> addr) : ScriptIdentity(addr), addr(reinterpret_cast<void*>(reinterpret_cast<intptr_t>(addr))) {}
};
struct ScriptFunctionData