Avoid initialisation of empty arrays.

This commit is contained in:
Matthias Mailänder
2021-10-21 17:39:28 +02:00
committed by abcdefg30
parent 5ff9d9a1f1
commit 3b5bfb4bf4
2 changed files with 2 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ namespace OpenRA.Traits
public ActorReferenceAttribute(Type requiredTrait = null,
LintDictionaryReference dictionaryReference = LintDictionaryReference.None)
{
RequiredTraits = requiredTrait != null ? new[] { requiredTrait } : new Type[0];
RequiredTraits = requiredTrait != null ? new[] { requiredTrait } : Array.Empty<Type>();
DictionaryReference = dictionaryReference;
}
}

View File

@@ -202,7 +202,7 @@ namespace OpenRA.Widgets
public string Y = "0";
public string Width = "0";
public string Height = "0";
public string[] Logic = { };
public string[] Logic = Array.Empty<string>();
public ChromeLogic[] LogicObjects { get; private set; }
public bool Visible = true;
public bool IgnoreMouseOver;