Fix RCS1068
This commit is contained in:
@@ -983,6 +983,9 @@ dotnet_diagnostic.RCS1059.severity = warning
|
||||
# Remove empty 'finally' clause.
|
||||
dotnet_diagnostic.RCS1066.severity = warning
|
||||
|
||||
# Simplify logical negation.
|
||||
dotnet_diagnostic.RCS1068.severity = warning
|
||||
|
||||
# Remove empty namespace declaration.
|
||||
dotnet_diagnostic.RCS1072.severity = warning
|
||||
|
||||
|
||||
@@ -676,7 +676,7 @@ namespace OpenRA.Support
|
||||
else if (t.Closes != Grouping.None)
|
||||
{
|
||||
Token temp;
|
||||
while (!((temp = s.Pop()).Opens != Grouping.None))
|
||||
while ((temp = s.Pop()).Opens == Grouping.None)
|
||||
yield return temp;
|
||||
}
|
||||
else if (t.OperandSides == Sides.None)
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
foreach (var minelayer in minelayers)
|
||||
{
|
||||
var cells = pathFinder.FindPathToTargetCell(minelayer.Actor, new[] { minelayer.Actor.Location }, enemy.Location, BlockedByActor.Immovable, laneBias: false);
|
||||
if (cells != null && !(cells.Count == 0))
|
||||
if (cells != null && cells.Count != 0)
|
||||
{
|
||||
AIUtils.BotDebug($"{player}: try find a location to lay mine.");
|
||||
EnqueueConflictPosition(cells[cells.Count / 2]);
|
||||
@@ -193,7 +193,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
foreach (var minelayer in minelayers)
|
||||
{
|
||||
var cells = pathFinder.FindPathToTargetCell(minelayer.Actor, new[] { minelayer.Actor.Location }, minelayingPosition, BlockedByActor.Immovable, laneBias: false);
|
||||
if (cells != null && !(cells.Count == 0))
|
||||
if (cells != null && cells.Count != 0)
|
||||
{
|
||||
orderedActors.Add(minelayer.Actor);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user