OccupiedCells and TargetableCells must return arrays, not just enumerables.
This allows callers to efficiently enumerate these returned collections without the allocation and overhead imposed by the IEnumerable interface. All implementations were already returning arrays, so this only required a signature change.
This commit is contained in:
committed by
Pavel Penev
parent
da036c5728
commit
62ab6ae6f1
@@ -203,7 +203,7 @@ namespace OpenRA.Traits
|
||||
{
|
||||
WPos CenterPosition { get; }
|
||||
CPos TopLeft { get; }
|
||||
IEnumerable<Pair<CPos, SubCell>> OccupiedCells();
|
||||
Pair<CPos, SubCell>[] OccupiedCells();
|
||||
}
|
||||
|
||||
public static class IOccupySpaceExts
|
||||
|
||||
Reference in New Issue
Block a user