mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-28 20:39:40 +00:00
[Server] Fix GCC build
This commit is contained in:
parent
9343b8af2f
commit
4ce0331f1b
2 changed files with 9 additions and 5 deletions
|
@ -110,10 +110,10 @@ template<> struct F_<3> { static constexpr LuaFuctionData F{"CallPublic", LangLu
|
|||
template<unsigned int I>
|
||||
struct C
|
||||
{
|
||||
constexpr C(LuaFuctionData *functions_)
|
||||
constexpr static void Fn(LuaFuctionData *functions_)
|
||||
{
|
||||
functions_[I] = F_<I>::F;
|
||||
C<I - 1>::C(functions_);
|
||||
C<I - 1>::Fn(functions_);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -121,7 +121,7 @@ struct C
|
|||
template<>
|
||||
struct C<0>
|
||||
{
|
||||
constexpr C(LuaFuctionData *functions_)
|
||||
constexpr static void Fn(LuaFuctionData *functions_)
|
||||
{
|
||||
functions_[0] = F_<0>::F;
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ LuaFuctionData *functions()
|
|||
{
|
||||
|
||||
static LuaFuctionData functions_[LastI];
|
||||
C<LastI - 1>::C(functions_);
|
||||
C<LastI - 1>::Fn(functions_);
|
||||
|
||||
static_assert(
|
||||
sizeof(functions_) / sizeof(functions_[0]) ==
|
||||
|
|
|
@ -103,9 +103,13 @@ 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(reinterpret_cast<void*>(addr)) {}
|
||||
#else
|
||||
template<typename R, typename... Types>
|
||||
constexpr ScriptFunctionPointer(Function<R, Types...> addr) : ScriptIdentity(addr), addr(addr) {}
|
||||
#endif
|
||||
};
|
||||
|
||||
struct ScriptFunctionData
|
||||
|
|
Loading…
Reference in a new issue