A bit of Range cleanup
This commit is contained in:
parent
f37b74c4ba
commit
abcf91f7d6
|
@ -559,7 +559,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
if (end <= start)
|
||||
return dict;
|
||||
|
||||
var range = new MutableRange<long>(start, end - 1);
|
||||
var range = start.RangeToExclusive(end);
|
||||
|
||||
switch (dataSize)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace BizHawk.Common
|
|||
private (T Start, T EndInclusive) r;
|
||||
|
||||
/// <inheritdoc cref="Overwrite"/>
|
||||
public MutableRange(T start, T endInclusive) => Overwrite(start, endInclusive);
|
||||
internal MutableRange(T start, T endInclusive) => Overwrite(start, endInclusive);
|
||||
|
||||
/// <exception cref="ArgumentOutOfRangeException">(from setter) <paramref name="value"/> > <see cref="EndInclusive"/></exception>
|
||||
public T Start
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace BizHawk.Emulation.Common
|
|||
// TODO: Memory domain doesn't have the overload we need :(
|
||||
var poop = new byte[count];
|
||||
// TODO: Range has the wrong end value
|
||||
_d.BulkPeekByte(new MutableRange<long>(Position, Position + count - 1), poop);
|
||||
_d.BulkPeekByte(Position.RangeToExclusive(Position + count), poop);
|
||||
Array.Copy(poop, 0, buffer, offset, count);
|
||||
Position += count;
|
||||
return count;
|
||||
|
|
|
@ -357,7 +357,7 @@ namespace BizHawk.Emulation.Cores.PCEngine
|
|||
// clear inter-sprite priority buffer
|
||||
Array.Clear(InterSpritePriorityBuffer, 0, FrameWidth);
|
||||
|
||||
var testRange = new MutableRange<int>(0, vdc.ActiveLine + 1);
|
||||
var testRange = 0.MutableRangeTo(vdc.ActiveLine + 1);
|
||||
for (int i = 0; i < 64; i++)
|
||||
{
|
||||
int y = (vdc.SpriteAttributeTable[(i * 4) + 0] & 1023) - 64;
|
||||
|
|
Loading…
Reference in New Issue