Use pattern matching
This commit is contained in:
committed by
atlimit8
parent
aed2b8afae
commit
2677e9c013
@@ -87,8 +87,7 @@ namespace OpenRA
|
||||
var ret = new MiniYaml(Type);
|
||||
foreach (var o in initDict.Value)
|
||||
{
|
||||
var init = o as ActorInit;
|
||||
if (init == null || o is ISuppressInitExport)
|
||||
if (!(o is ActorInit init) || o is ISuppressInitExport)
|
||||
continue;
|
||||
|
||||
if (initFilter != null && !initFilter(init))
|
||||
|
||||
Reference in New Issue
Block a user