mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-04-22 22:52:55 +00:00
Structural and Memory Safety Improvements, Analyzer Cleanup (ryubing/ryujinx!47)
See merge request ryubing/ryujinx!47
This commit is contained in:
@@ -11,9 +11,7 @@ namespace Ryujinx.Tests.Memory
|
||||
|
||||
public MemoryManagerType Type => MemoryManagerType.HostMappedUnsafe;
|
||||
|
||||
#pragma warning disable CS0067 // The event is never used
|
||||
public event Action<ulong, ulong> UnmapEvent;
|
||||
#pragma warning restore CS0067
|
||||
|
||||
public ref T GetRef<T>(ulong va) where T : unmanaged
|
||||
{
|
||||
@@ -49,5 +47,12 @@ namespace Ryujinx.Tests.Memory
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
// Since the mock never unmaps memory, the UnmapEvent is never used and this causes a warning.
|
||||
// This method is provided to allow the mock to trigger the event if needed.
|
||||
public void Unmap(ulong va, ulong size)
|
||||
{
|
||||
UnmapEvent?.Invoke(va, size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ using Ryujinx.Memory;
|
||||
using Ryujinx.Memory.Tracking;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
Reference in New Issue
Block a user