Replace arrays with sets.

In places where arrays were being treated as a set, just create a set directly. This reveals the intention of such collections better, and also improves performance by allowing set based methods to be used.
This commit is contained in:
RoosterDragon
2015-09-03 20:09:16 +01:00
parent 4f4bab2cdf
commit 901e604cf3
19 changed files with 43 additions and 38 deletions

View File

@@ -51,7 +51,7 @@ namespace OpenRA.Mods.Common.Traits
return;
var warhead = e.Warhead as DamageWarhead;
if (info.DeathType != null && warhead != null && !info.DeathType.Intersect(warhead.DamageTypes).Any())
if (info.DeathType != null && warhead != null && !warhead.DamageTypes.Overlaps(info.DeathType))
return;
var weaponName = ChooseWeaponForExplosion(self);