1
0
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:
AlexVinS
2014-05-19 02:28:44 +04:00
parent e90fae9638
commit eff801f39a
3 changed files with 23 additions and 14 deletions

View File

@ -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;