diff options
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Memory/RangeList.cs')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Memory/RangeList.cs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.Gpu/Memory/RangeList.cs b/Ryujinx.Graphics.Gpu/Memory/RangeList.cs index 1d185e21..75be1cf2 100644 --- a/Ryujinx.Graphics.Gpu/Memory/RangeList.cs +++ b/Ryujinx.Graphics.Gpu/Memory/RangeList.cs @@ -1,4 +1,5 @@ using System; +using System.Collections; using System.Collections.Generic; namespace Ryujinx.Graphics.Gpu.Memory @@ -7,11 +8,11 @@ namespace Ryujinx.Graphics.Gpu.Memory /// List of GPU resources with data on guest memory. /// </summary> /// <typeparam name="T">Type of the GPU resource</typeparam> - class RangeList<T> where T : IRange<T> + class RangeList<T> : IEnumerable<T> where T : IRange<T> { private const int ArrayGrowthSize = 32; - private List<T> _items; + private readonly List<T> _items; /// <summary> /// Creates a new GPU resources list. @@ -320,5 +321,15 @@ namespace Ryujinx.Graphics.Gpu.Memory return ~left; } + + public IEnumerator<T> GetEnumerator() + { + return _items.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return _items.GetEnumerator(); + } } }
\ No newline at end of file |
