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

@@ -191,7 +191,7 @@ void CAnimation::init()
std::unique_ptr<ui8[]> textData(new ui8[stream->getSize()]);
stream->read(textData.get(), stream->getSize());
const JsonNode config(reinterpret_cast<const std::byte*>(textData.get()), stream->getSize());
const JsonNode config(reinterpret_cast<const std::byte*>(textData.get()), stream->getSize(), jsonResource.getName());
initFromJson(config);
}