Revert "Make LuaImplQueryArg impl for std::vector (#162)"
This reverts commit 24ec816762.
This commit is contained in:
parent
95f137816a
commit
03e976993f
|
|
@ -159,36 +159,6 @@ namespace Nz
|
||||||
return LuaImplQueryArg(instance, index, arg, defValue, TypeTag<T>());
|
return LuaImplQueryArg(instance, index, arg, defValue, TypeTag<T>());
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
unsigned int LuaImplQueryArg(const LuaState& instance, int index, std::vector<T>* container, TypeTag<std::vector<T>>)
|
|
||||||
{
|
|
||||||
instance.CheckType(index, Nz::LuaType_Table);
|
|
||||||
std::size_t index = 1;
|
|
||||||
|
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
instance.PushInteger(index++);
|
|
||||||
|
|
||||||
if (instance.GetTable() == Nz::LuaType_Nil)
|
|
||||||
{
|
|
||||||
instance.Pop();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
T arg {};
|
|
||||||
|
|
||||||
if (LuaImplQueryArg(instance, -1, &arg, TypeTag<T>()) != 1)
|
|
||||||
{
|
|
||||||
instance.Error("Type needs more than one place to be initialized");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
container->push_back(arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Function returns
|
// Function returns
|
||||||
inline int LuaImplReplyVal(const LuaState& instance, bool val, TypeTag<bool>)
|
inline int LuaImplReplyVal(const LuaState& instance, bool val, TypeTag<bool>)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue