Big f***ing cleanup part 1

This commit is contained in:
Lynix
2020-02-23 00:42:22 +01:00
parent 67d0e0a689
commit 3d22321109
178 changed files with 2190 additions and 5113 deletions

View File

@@ -43,6 +43,16 @@ namespace Nz
return 1;
}
inline unsigned int LuaImplQueryArg(const LuaState& instance, int index, std::filesystem::path* arg, TypeTag<std::filesystem::path>)
{
std::size_t strLength = 0;
const char* str = instance.CheckString(index, &strLength);
arg->assign(std::string_view(str, strLength));
return 1;
}
inline unsigned int LuaImplQueryArg(const LuaState& instance, int index, std::string* arg, TypeTag<std::string>)
{
std::size_t strLength = 0;
@@ -272,6 +282,11 @@ namespace Nz
return 1;
}
inline int LuaImplReplyVal(const LuaState& instance, std::filesystem::path&& val, TypeTag<std::filesystem::path>)
{
return LuaImplReplyVal(instance, val.generic_u8string(), TypeTag<std::string>());
}
template<typename T>
inline int LuaImplReplyVal(const LuaState& instance, std::vector<T>&& valContainer, TypeTag<std::vector<T>>)
{