1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

indentation fix

This commit is contained in:
Henning Koehler 2017-09-16 10:30:57 +12:00
parent ee46862784
commit 20172dba7c

View File

@ -237,24 +237,24 @@ bool JsonNode::isCompact() const
{
switch(type)
{
case JsonType::DATA_VECTOR:
for(JsonNode & elem : *data.Vector)
{
if(!elem.isCompact())
return false;
}
return true;
case JsonType::DATA_STRUCT:
{
int propertyCount = data.Struct->size();
if(propertyCount == 0)
return true;
else if(propertyCount == 1)
return data.Struct->begin()->second.isCompact();
}
return false;
default:
return true;
case JsonType::DATA_VECTOR:
for(JsonNode & elem : *data.Vector)
{
if(!elem.isCompact())
return false;
}
return true;
case JsonType::DATA_STRUCT:
{
int propertyCount = data.Struct->size();
if(propertyCount == 0)
return true;
else if(propertyCount == 1)
return data.Struct->begin()->second.isCompact();
}
return false;
default:
return true;
}
}