Fixed unnecessary zero-length array allocations
Changed all currently present zero-length array allocations in the codebase to use `Array.Empty` instead.
This commit is contained in:
@@ -77,7 +77,7 @@ namespace OpenRA.Primitives
|
||||
{
|
||||
if (data.TryGetValue(typeof(T), out var objs))
|
||||
return objs.Cast<T>();
|
||||
return new T[0];
|
||||
return Array.Empty<T>();
|
||||
}
|
||||
|
||||
public void Remove<T>(T val)
|
||||
|
||||
Reference in New Issue
Block a user