aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Memory/Range/MultiRange.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Memory/Range/MultiRange.cs')
-rw-r--r--Ryujinx.Memory/Range/MultiRange.cs38
1 files changed, 1 insertions, 37 deletions
diff --git a/Ryujinx.Memory/Range/MultiRange.cs b/Ryujinx.Memory/Range/MultiRange.cs
index dc2aefe4..9dbd76ec 100644
--- a/Ryujinx.Memory/Range/MultiRange.cs
+++ b/Ryujinx.Memory/Range/MultiRange.cs
@@ -21,16 +21,6 @@ namespace Ryujinx.Memory.Range
public int Count => HasSingleRange ? 1 : _ranges.Length;
/// <summary>
- /// Minimum start address of all sub-ranges.
- /// </summary>
- public ulong MinAddress { get; }
-
- /// <summary>
- /// Maximum end address of all sub-ranges.
- /// </summary>
- public ulong MaxAddress { get; }
-
- /// <summary>
/// Creates a new multi-range with a single physical region.
/// </summary>
/// <param name="address">Start address of the region</param>
@@ -39,8 +29,6 @@ namespace Ryujinx.Memory.Range
{
_singleRange = new MemoryRange(address, size);
_ranges = null;
- MinAddress = address;
- MaxAddress = address + size;
}
/// <summary>
@@ -52,30 +40,6 @@ namespace Ryujinx.Memory.Range
{
_singleRange = MemoryRange.Empty;
_ranges = ranges ?? throw new ArgumentNullException(nameof(ranges));
-
- if (ranges.Length != 0)
- {
- MinAddress = ulong.MaxValue;
- MaxAddress = 0UL;
-
- foreach (MemoryRange range in ranges)
- {
- if (MinAddress > range.Address)
- {
- MinAddress = range.Address;
- }
-
- if (MaxAddress < range.EndAddress)
- {
- MaxAddress = range.EndAddress;
- }
- }
- }
- else
- {
- MinAddress = 0UL;
- MaxAddress = 0UL;
- }
}
/// <summary>
@@ -84,7 +48,7 @@ namespace Ryujinx.Memory.Range
/// <param name="offset">Offset of the slice into the multi-range in bytes</param>
/// <param name="size">Size of the slice in bytes</param>
/// <returns>A new multi-range representing the given slice of this one</returns>
- public MultiRange GetSlice(ulong offset, ulong size)
+ public MultiRange Slice(ulong offset, ulong size)
{
if (HasSingleRange)
{