Refactor classes to structs

This commit is contained in:
teinarss
2020-07-06 20:27:24 +02:00
committed by abcdefg30
parent 544ac6cb33
commit d52e4793fe
4 changed files with 29 additions and 12 deletions

View File

@@ -117,7 +117,7 @@ namespace OpenRA
return GetEnumerator();
}
public sealed class CellRegionEnumerator : IEnumerator<CPos>
public struct CellRegionEnumerator : IEnumerator<CPos>
{
readonly CellRegion r;
@@ -128,9 +128,11 @@ namespace OpenRA
CPos current;
public CellRegionEnumerator(CellRegion region)
: this()
{
r = region;
Reset();
current = new MPos(u, v).ToCPos(r.gridType);
}
public bool MoveNext()