Skip to content

Commit 1a709aa

Browse files
committed
Use allocation free enumerator
1 parent 18fd051 commit 1a709aa

File tree

1 file changed

+2
-6
lines changed
  • Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions

1 file changed

+2
-6
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs

+2-6
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public enum AxleDriveType
5050
/// Sums individual axle values to create a total value
5151
/// </summary>
5252

53-
public class Axles : IEnumerable<Axle>, ISubSystem<Axles>
53+
public class Axles : ISubSystem<Axles>
5454
{
5555
/// <summary>
5656
/// List of axles
@@ -249,11 +249,7 @@ public void Update(float elapsedClockSeconds)
249249
axle.Update(elapsedClockSeconds);
250250
}
251251
}
252-
IEnumerator IEnumerable.GetEnumerator()
253-
{
254-
return AxleList.GetEnumerator();
255-
}
256-
IEnumerator<Axle> IEnumerable<Axle>.GetEnumerator()
252+
public List<Axle>.Enumerator GetEnumerator()
257253
{
258254
return AxleList.GetEnumerator();
259255
}

0 commit comments

Comments
 (0)