.Any(), .Count() -> .Count or .Length

This commit is contained in:
Eduardo Cáceres
2022-05-02 13:05:22 +02:00
committed by atlimit8
parent 6eb4fe8980
commit 79f321cb44
138 changed files with 233 additions and 258 deletions

View File

@@ -87,7 +87,7 @@ namespace OpenRA.Mods.Common.Traits
while (true)
{
var step = NextNeighbourStep(seed, processed).ToList();
if (!step.Any())
if (step.Count == 0)
break;
foreach (var s in step)
@@ -230,7 +230,7 @@ namespace OpenRA.Mods.Common.Traits
{
get
{
if (!segments.Any())
if (segments.Count == 0)
return DamageState.Undamaged;
return segments.Values.Max(s => s.DamageState);