aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.GAL/Multithreading/CommandHelper.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Graphics.GAL/Multithreading/CommandHelper.cs')
-rw-r--r--src/Ryujinx.Graphics.GAL/Multithreading/CommandHelper.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Ryujinx.Graphics.GAL/Multithreading/CommandHelper.cs b/src/Ryujinx.Graphics.GAL/Multithreading/CommandHelper.cs
index 9f6e483c..12c5245a 100644
--- a/src/Ryujinx.Graphics.GAL/Multithreading/CommandHelper.cs
+++ b/src/Ryujinx.Graphics.GAL/Multithreading/CommandHelper.cs
@@ -17,8 +17,8 @@ namespace Ryujinx.Graphics.GAL.Multithreading
{
private delegate void CommandDelegate(Span<byte> memory, ThreadedRenderer threaded, IRenderer renderer);
- private static int _totalCommands = (int)Enum.GetValues<CommandType>().Max() + 1;
- private static CommandDelegate[] _lookup = new CommandDelegate[_totalCommands];
+ private static readonly int _totalCommands = (int)Enum.GetValues<CommandType>().Max() + 1;
+ private static readonly CommandDelegate[] _lookup = new CommandDelegate[_totalCommands];
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static ref T GetCommand<T>(Span<byte> memory)
@@ -146,7 +146,7 @@ namespace Ryujinx.Graphics.GAL.Multithreading
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void RunCommand(Span<byte> memory, ThreadedRenderer threaded, IRenderer renderer)
{
- _lookup[memory[memory.Length - 1]](memory, threaded, renderer);
+ _lookup[memory[^1]](memory, threaded, renderer);
}
}
}