Lua: Fix compilation error with some arguments type
Former-commit-id: 954f5ddff3c7fba4fa5975321f2c6a1c89c3d4ad
This commit is contained in:
@@ -133,8 +133,8 @@ namespace Nz
|
||||
void Remove(int index);
|
||||
void Replace(int index);
|
||||
|
||||
void SetField(const char* name, int index = -2);
|
||||
void SetField(const String& name, int index = -2);
|
||||
void SetField(const char* name, int tableIndex = -2);
|
||||
void SetField(const String& name, int tableIndex = -2);
|
||||
void SetGlobal(const char* name);
|
||||
void SetGlobal(const String& name);
|
||||
void SetMetatable(const char* tname);
|
||||
|
||||
@@ -137,6 +137,12 @@ namespace Nz
|
||||
{
|
||||
}
|
||||
|
||||
template<unsigned int N>
|
||||
void ProcessArgs()
|
||||
{
|
||||
// No argument to process
|
||||
}
|
||||
|
||||
template<unsigned int N, typename ArgType>
|
||||
void ProcessArgs()
|
||||
{
|
||||
@@ -168,7 +174,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
private:
|
||||
std::tuple<Args...> m_args;
|
||||
std::tuple<std::remove_cv_t<std::remove_reference_t<Args>>...> m_args;
|
||||
LuaInstance& m_instance;
|
||||
};
|
||||
|
||||
@@ -185,6 +191,7 @@ namespace Nz
|
||||
template<unsigned int N>
|
||||
void ProcessArgs()
|
||||
{
|
||||
// No argument to process
|
||||
}
|
||||
|
||||
template<unsigned int N, typename ArgType>
|
||||
@@ -232,7 +239,7 @@ namespace Nz
|
||||
}
|
||||
|
||||
private:
|
||||
std::tuple<Args...> m_args;
|
||||
std::tuple<std::remove_cv_t<std::remove_reference_t<Args>>...> m_args;
|
||||
LuaInstance& m_instance;
|
||||
T& m_object;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user