Avoid initialisation of empty arrays.
This commit is contained in:
committed by
abcdefg30
parent
5ff9d9a1f1
commit
3b5bfb4bf4
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user