dynamic::Value simplified

This commit is contained in:
MihailRis
2024-05-07 18:39:12 +03:00
parent 8e83a07094
commit a4c21984d5
26 changed files with 230 additions and 297 deletions
+2 -4
View File
@@ -72,7 +72,7 @@ static void show_content_missing(
std::shared_ptr<ContentLUT> lut
) {
using namespace dynamic;
auto root = std::make_unique<Map>();
auto root = std::make_shared<Map>();
auto& contentEntries = root->putList("content");
for (auto& entry : lut->getMissingContent()) {
std::string contentName = contenttype_name(entry.type);
@@ -80,9 +80,7 @@ static void show_content_missing(
contentEntry.put("type", contentName);
contentEntry.put("name", entry.name);
}
std::vector<std::unique_ptr<dynamic::Value>> args;
args.emplace_back(std::make_unique<Value>(root.release()));
menus::show(engine, "reports/missing_content", std::move(args));
menus::show(engine, "reports/missing_content", {root});
}
static bool loadWorldContent(Engine* engine, fs::path folder) {