mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-21 00:19:29 +02:00
Extract "inherit node" function
This commit is contained in:
@ -735,6 +735,13 @@ void JsonUtils::mergeCopy(JsonNode & dest, JsonNode source)
|
||||
merge(dest, source);
|
||||
}
|
||||
|
||||
void JsonUtils::inherit(JsonNode & descendant, const JsonNode & base)
|
||||
{
|
||||
JsonNode inheritedNode(base);
|
||||
merge(inheritedNode,descendant);
|
||||
descendant.swap(inheritedNode);
|
||||
}
|
||||
|
||||
JsonNode JsonUtils::assembleFromFiles(std::vector<std::string> files)
|
||||
{
|
||||
bool isValid;
|
||||
|
Reference in New Issue
Block a user