Use Tuple syntax

This commit is contained in:
teinarss
2020-08-02 13:41:03 +02:00
committed by Paul Chote
parent 8a74f6ea18
commit 19b02875c7
90 changed files with 738 additions and 826 deletions

View File

@@ -9,18 +9,17 @@
*/
#endregion
using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.Common
{
public static class ShroudExts
{
public static bool AnyExplored(this Shroud shroud, Pair<CPos, SubCell>[] cells)
public static bool AnyExplored(this Shroud shroud, (CPos Cell, SubCell SubCell)[] cells)
{
// PERF: Avoid LINQ.
foreach (var cell in cells)
if (shroud.IsExplored(cell.First))
if (shroud.IsExplored(cell.Cell))
return true;
return false;
@@ -36,11 +35,11 @@ namespace OpenRA.Mods.Common
return false;
}
public static bool AnyVisible(this Shroud shroud, Pair<CPos, SubCell>[] cells)
public static bool AnyVisible(this Shroud shroud, (CPos Cell, SubCell SubCell)[] cells)
{
// PERF: Avoid LINQ.
foreach (var cell in cells)
if (shroud.IsVisible(cell.First))
if (shroud.IsVisible(cell.Cell))
return true;
return false;