aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Common/Memory/PartialUnmaps/ThreadLocalMap.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Common/Memory/PartialUnmaps/ThreadLocalMap.cs')
-rw-r--r--src/Ryujinx.Common/Memory/PartialUnmaps/ThreadLocalMap.cs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Ryujinx.Common/Memory/PartialUnmaps/ThreadLocalMap.cs b/src/Ryujinx.Common/Memory/PartialUnmaps/ThreadLocalMap.cs
index a3bd5be8..a3c3dc57 100644
--- a/src/Ryujinx.Common/Memory/PartialUnmaps/ThreadLocalMap.cs
+++ b/src/Ryujinx.Common/Memory/PartialUnmaps/ThreadLocalMap.cs
@@ -1,6 +1,5 @@
using System.Runtime.InteropServices;
using System.Threading;
-
using static Ryujinx.Common.Memory.PartialUnmaps.PartialUnmapHelpers;
namespace Ryujinx.Common.Memory.PartialUnmaps
@@ -18,15 +17,15 @@ namespace Ryujinx.Common.Memory.PartialUnmaps
public Array20<int> ThreadIds;
public Array20<T> Structs;
- public static int ThreadIdsOffset;
- public static int StructsOffset;
+ public static readonly int ThreadIdsOffset;
+ public static readonly int StructsOffset;
/// <summary>
/// Populates the field offsets for use when emitting native code.
/// </summary>
static ThreadLocalMap()
{
- ThreadLocalMap<T> instance = new ThreadLocalMap<T>();
+ ThreadLocalMap<T> instance = new();
ThreadIdsOffset = OffsetOf(ref instance, ref instance.ThreadIds);
StructsOffset = OffsetOf(ref instance, ref instance.Structs);