Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions LibCpp2IL/Metadata/Il2CppVariableWidthIndex.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Threading;

namespace LibCpp2IL.Metadata;
Expand All @@ -14,7 +14,7 @@ namespace LibCpp2IL.Metadata;
/// - v105 extends this to MethodIndex
/// </summary>
/// <typeparam name="T"></typeparam>
public record struct Il2CppVariableWidthIndex<T> where T : ReadableClass
public readonly record struct Il2CppVariableWidthIndex<T> where T : ReadableClass
{
//Statics here are per-T.
private static int widthForThisTypeOnCurrentApplication = -1; // -1 means "not yet determined"
Expand All @@ -27,7 +27,7 @@ public record struct Il2CppVariableWidthIndex<T> where T : ReadableClass
/// </summary>
private static object readSessionLock = new object();

private int value;
private readonly int value;

public bool IsNull => value < 0; //The exact value of the "null" index depends on the width
public bool IsNonNull => !IsNull;
Expand Down
Loading