Improvement of cyclomatic complexity by fewer nestings.
This commit is contained in:
committed by
Pavel Penev
parent
91802e6f10
commit
ee6f8ae45d
@@ -260,8 +260,9 @@ namespace OpenRA
|
||||
return true;
|
||||
|
||||
// Any trait overrides that aren't explicitly whitelisted are flagged
|
||||
if (mapRules != null)
|
||||
{
|
||||
if (mapRules == null)
|
||||
return false;
|
||||
|
||||
if (AnyFlaggedTraits(modData, mapRules.Nodes))
|
||||
return true;
|
||||
|
||||
@@ -272,7 +273,6 @@ namespace OpenRA
|
||||
if (AnyFlaggedTraits(modData, MiniYaml.FromStream(fileSystem.Open(f), f)))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user