Use expression body syntax

This commit is contained in:
teinarss
2021-02-25 20:52:13 +01:00
committed by Paul Chote
parent 555c43843b
commit 4a1e4f3e16
403 changed files with 1342 additions and 2031 deletions

View File

@@ -208,8 +208,8 @@ namespace OpenRA
public void Reset() { index = actors.BinarySearchMany(actor) - 1; }
public bool MoveNext() { return ++index < actors.Count && actors[index].ActorID == actor; }
public T Current { get { return traits[index]; } }
object System.Collections.IEnumerator.Current { get { return Current; } }
public T Current => traits[index];
object System.Collections.IEnumerator.Current => Current;
public void Dispose() { }
}
@@ -272,8 +272,8 @@ namespace OpenRA
public void Reset() { index = -1; }
public bool MoveNext() { return ++index < actors.Count; }
public TraitPair<T> Current { get { return new TraitPair<T>(actors[index], traits[index]); } }
object System.Collections.IEnumerator.Current { get { return Current; } }
public TraitPair<T> Current => new TraitPair<T>(actors[index], traits[index]);
object System.Collections.IEnumerator.Current => Current;
public void Dispose() { }
}