1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

JsonNode constructors: Take fileName as argument

* Don't print JSON in JsonParser::parse() in case of errors
This commit is contained in:
Alexander Wilms
2024-07-17 13:07:57 +02:00
parent 1ca8e9b3ae
commit 434371195d
15 changed files with 21 additions and 22 deletions

View File

@@ -269,7 +269,7 @@ JsonNode JsonUtils::assembleFromFiles(const std::string & filename)
for(auto & loader : CResourceHandler::get()->getResourcesWithName(resID))
{
auto textData = loader->load(resID)->readAll();
JsonNode section(reinterpret_cast<std::byte *>(textData.first.get()), textData.second);
JsonNode section(reinterpret_cast<std::byte *>(textData.first.get()), textData.second, resID.getName());
merge(result, section);
}
return result;