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:
@@ -9,6 +9,7 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.GameRules;
|
||||
@@ -80,8 +81,8 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
CurrentMuzzleFacing = () => (map.CenterOfCell(targetCell) - target.CenterPosition).Yaw,
|
||||
|
||||
DamageModifiers = args.DamageModifiers,
|
||||
InaccuracyModifiers = new int[0],
|
||||
RangeModifiers = new int[0],
|
||||
InaccuracyModifiers = Array.Empty<int>(),
|
||||
RangeModifiers = Array.Empty<int>(),
|
||||
|
||||
Source = target.CenterPosition,
|
||||
CurrentSource = () => target.CenterPosition,
|
||||
|
||||
Reference in New Issue
Block a user