Less serialization and deserialization of Lua Source, also, Invocation is now simpler
This commit is contained in:
@@ -193,7 +193,7 @@ class Driver {
|
||||
std::string err = drvutil::package_lua_source(".", &oss);
|
||||
if_error_print_and_exit(err);
|
||||
std::string_view ossv = oss.view();
|
||||
engw.play_set_lua_source(&engw, ossv.size(), ossv.data());
|
||||
engw.play_set_lua_source_pack(&engw, ossv.size(), ossv.data());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -345,8 +345,6 @@ std::string package_lua_source(const std::filesystem::path &base, std::ostream *
|
||||
sbwrite_uint32(s, names.size());
|
||||
for (int i = 0; i < int(names.size()); i++) {
|
||||
sbwrite_string(s, names[i]);
|
||||
}
|
||||
for (int i = 0; i < int(names.size()); i++) {
|
||||
std::filesystem::path lfn = base / "lua" / names[i];
|
||||
if (!sbwrite_file(s, lfn)) {
|
||||
return std::string("Cannot read source file: ") + lfn.u8string();
|
||||
|
||||
Reference in New Issue
Block a user