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

Renamed JsonNode::meta to more logical modScope. Member is now private

This commit is contained in:
Ivan Savenko
2024-02-13 14:34:16 +02:00
parent e73516b7d1
commit 922966dcf8
46 changed files with 154 additions and 148 deletions

View File

@@ -124,9 +124,14 @@ JsonNode::JsonType JsonNode::getType() const
return static_cast<JsonType>(data.index());
}
void JsonNode::setMeta(const std::string & metadata, bool recursive)
const std::string & JsonNode::getModScope() const
{
meta = metadata;
return modScope;
}
void JsonNode::setModScope(const std::string & metadata, bool recursive)
{
modScope = metadata;
if (recursive)
{
switch (getType())
@@ -135,14 +140,14 @@ void JsonNode::setMeta(const std::string & metadata, bool recursive)
{
for(auto & node : Vector())
{
node.setMeta(metadata);
node.setModScope(metadata);
}
}
break; case JsonType::DATA_STRUCT:
{
for(auto & node : Struct())
{
node.second.setMeta(metadata);
node.second.setModScope(metadata);
}
}
}