mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-26 22:45:15 -04:00
Merge pull request #14 from HotaruBlaze/ScriptPointerFix
Fix ScriptFunctionPointer
This commit is contained in:
commit
73268198e0
@ -99,13 +99,9 @@ struct CallbackIdentity
|
|||||||
struct ScriptFunctionPointer : public ScriptIdentity
|
struct ScriptFunctionPointer : public ScriptIdentity
|
||||||
{
|
{
|
||||||
void *addr;
|
void *addr;
|
||||||
#if (!defined(__clang__) && defined(__GNUC__))
|
|
||||||
template<typename R, typename... Types>
|
template<typename R, typename... Types>
|
||||||
constexpr ScriptFunctionPointer(Function<R, Types...> addr) : ScriptIdentity(addr), addr((void*)(addr)) {}
|
constexpr ScriptFunctionPointer(Function<R, Types...> addr) : ScriptIdentity(addr), addr(reinterpret_cast<void*>(reinterpret_cast<intptr_t>(addr))) {}
|
||||||
#else
|
|
||||||
template<typename R, typename... Types>
|
|
||||||
constexpr ScriptFunctionPointer(Function<R, Types...> addr) : ScriptIdentity(addr), addr(addr) {}
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ScriptFunctionData
|
struct ScriptFunctionData
|
||||||
|
Loading…
x
Reference in New Issue
Block a user