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:
@@ -370,11 +370,11 @@ namespace OpenRA
|
||||
newData.SpawnPoints = spawns.ToArray();
|
||||
}
|
||||
else
|
||||
newData.SpawnPoints = new CPos[0];
|
||||
newData.SpawnPoints = Array.Empty<CPos>();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
newData.SpawnPoints = new CPos[0];
|
||||
newData.SpawnPoints = Array.Empty<CPos>();
|
||||
newData.Status = MapStatus.Unavailable;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user