Fix findPath returning a raw vector

This commit is contained in:
uramer 2024-11-30 09:32:05 +01:00
parent 064e3c7c2e
commit 1675c74036
4 changed files with 18 additions and 10 deletions

View file

@ -372,6 +372,12 @@ namespace LuaUtil
}
sol::table getMutableFromReadOnly(const sol::userdata&);
template <class T>
void copyVectorToTable(const std::vector<T>& v, sol::table& out)
{
for (const T& t : v)
out.add(t);
}
}
#endif // COMPONENTS_LUA_LUASTATE_H