make some struct properties readonly
This commit is contained in:
parent
caa4e6d1e6
commit
abc0dcf72c
2 changed files with 5 additions and 5 deletions
|
@ -12,12 +12,12 @@ namespace Ryujinx.Memory.Range
|
||||||
_enumerator = new PagedMemoryRangeEnumerator(startAddress, size, pageSize, mapAddress);
|
_enumerator = new PagedMemoryRangeEnumerator(startAddress, size, pageSize, mapAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
public MemoryRange Current => _current!.Value;
|
public readonly MemoryRange Current => _current!.Value;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returning this through a GetEnumerator() call allows it to be used directly in a foreach loop.
|
/// Returning this through a GetEnumerator() call allows it to be used directly in a foreach loop.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public PagedMemoryRangeCoalescingEnumerator GetEnumerator() => this;
|
public readonly PagedMemoryRangeCoalescingEnumerator GetEnumerator() => this;
|
||||||
|
|
||||||
public bool MoveNext()
|
public bool MoveNext()
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,14 +22,14 @@ namespace Ryujinx.Memory.Range
|
||||||
_offset = 0;
|
_offset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MemoryRange Current => _current!.Value;
|
public readonly MemoryRange Current => _current!.Value;
|
||||||
|
|
||||||
internal bool HasCurrent => _current.HasValue;
|
internal readonly bool HasCurrent => _current.HasValue;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returning this through a GetEnumerator() call allows it to be used directly in a foreach loop.
|
/// Returning this through a GetEnumerator() call allows it to be used directly in a foreach loop.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public PagedMemoryRangeEnumerator GetEnumerator() => this;
|
public readonly PagedMemoryRangeEnumerator GetEnumerator() => this;
|
||||||
|
|
||||||
public bool MoveNext()
|
public bool MoveNext()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue