mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-03-15 04:14:47 +00:00
misc: chore: Fix object creation in Memory project
This commit is contained in:
parent
56d373a011
commit
ae92fbf539
3 changed files with 3 additions and 4 deletions
|
@ -234,8 +234,7 @@ namespace Ryujinx.Memory
|
|||
protected unsafe override Memory<byte> GetPhysicalAddressMemory(nuint pa, int size)
|
||||
=> new NativeMemoryManager<byte>((byte*)pa, size).Memory;
|
||||
|
||||
protected override unsafe Span<byte> GetPhysicalAddressSpan(nuint pa, int size)
|
||||
=> new Span<byte>((void*)pa, size);
|
||||
protected override unsafe Span<byte> GetPhysicalAddressSpan(nuint pa, int size) => new((void*)pa, size);
|
||||
|
||||
protected override nuint TranslateVirtualAddressChecked(ulong va)
|
||||
=> GetHostAddress(va);
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace Ryujinx.Memory
|
|||
|
||||
public BytesReadOnlySequenceSegment Append(Memory<byte> memory)
|
||||
{
|
||||
BytesReadOnlySequenceSegment nextSegment = new BytesReadOnlySequenceSegment(memory)
|
||||
BytesReadOnlySequenceSegment nextSegment = new(memory)
|
||||
{
|
||||
RunningIndex = RunningIndex + Memory.Length
|
||||
};
|
||||
|
|
|
@ -173,7 +173,7 @@ namespace Ryujinx.Memory.Range
|
|||
private List<T> GetList()
|
||||
{
|
||||
List<RangeNode<ulong, T>> items = _items.AsList();
|
||||
List<T> result = new List<T>();
|
||||
List<T> result = new();
|
||||
|
||||
foreach (RangeNode<ulong, T> item in items)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue