mirror of
https://github.com/LukeFZ/Il2CppInspectorRedux.git
synced 2026-03-22 00:18:18 +05:00
remove unnecessary AddedVersion member in IIndexType
This commit is contained in:
@@ -7,7 +7,6 @@ public struct DefaultValueDataIndex(int value) : IIndexType<DefaultValueDataInde
|
||||
public const string TagPrefix = nameof(DefaultValueDataIndex);
|
||||
|
||||
static string IIndexType<DefaultValueDataIndex>.TagPrefix => TagPrefix;
|
||||
static StructVersion IIndexType<DefaultValueDataIndex>.AddedVersion => MetadataVersions.V390;
|
||||
|
||||
private int _value = value;
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ public struct EventIndex(int value) : IIndexType<EventIndex>, IReadable, IEquata
|
||||
{
|
||||
public const string TagPrefix = nameof(EventIndex);
|
||||
|
||||
static string IIndexType<EventIndex>.TagPrefix => TagPrefix;
|
||||
static StructVersion IIndexType<EventIndex>.AddedVersion => MetadataVersions.V390;
|
||||
static string IIndexType<EventIndex>.TagPrefix => TagPrefix;
|
||||
|
||||
private int _value = value;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ public struct FieldIndex(int value) : IIndexType<FieldIndex>, IReadable, IEquata
|
||||
public const string TagPrefix = nameof(FieldIndex);
|
||||
|
||||
static string IIndexType<FieldIndex>.TagPrefix => TagPrefix;
|
||||
static StructVersion IIndexType<FieldIndex>.AddedVersion => MetadataVersions.V390;
|
||||
|
||||
private int _value = value;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ public struct GenericContainerIndex(int value) : IIndexType<GenericContainerInde
|
||||
public const string TagPrefix = nameof(GenericContainerIndex);
|
||||
|
||||
static string IIndexType<GenericContainerIndex>.TagPrefix => TagPrefix;
|
||||
static StructVersion IIndexType<GenericContainerIndex>.AddedVersion => MetadataVersions.V390;
|
||||
|
||||
private int _value = value;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ public struct GenericParameterIndex(int value) : IIndexType<GenericParameterInde
|
||||
public const string TagPrefix = nameof(GenericParameterIndex);
|
||||
|
||||
static string IIndexType<GenericParameterIndex>.TagPrefix => TagPrefix;
|
||||
static StructVersion IIndexType<GenericParameterIndex>.AddedVersion => MetadataVersions.V390;
|
||||
|
||||
private int _value = value;
|
||||
|
||||
|
||||
@@ -6,17 +6,15 @@ public interface IIndexType<T> where T
|
||||
: IIndexType<T>, allows ref struct
|
||||
{
|
||||
public static abstract string TagPrefix { get; }
|
||||
public static abstract StructVersion AddedVersion { get; }
|
||||
|
||||
private static string TagSize4 => $"{T.TagPrefix}4";
|
||||
private static string TagSize2 => $"{T.TagPrefix}2";
|
||||
private static string TagSize1 => $"{T.TagPrefix}1";
|
||||
|
||||
private static bool HasCustomSize(in StructVersion version)
|
||||
=> version >= T.AddedVersion
|
||||
&& version.Tag != null
|
||||
&& version.Tag.Contains(T.TagPrefix)
|
||||
&& !version.Tag.Contains(TagSize4);
|
||||
=> version.Tag != null
|
||||
&& (version.Tag.Contains(TagSize2)
|
||||
|| version.Tag.Contains(TagSize1));
|
||||
|
||||
public static int IndexSize(in StructVersion version = default, bool is32Bit = false)
|
||||
{
|
||||
|
||||
@@ -6,8 +6,7 @@ public struct InterfacesIndex(int value) : IIndexType<InterfacesIndex>, IReadabl
|
||||
{
|
||||
public const string TagPrefix = nameof(InterfacesIndex);
|
||||
|
||||
static string IIndexType<InterfacesIndex>.TagPrefix => TagPrefix;
|
||||
static StructVersion IIndexType<InterfacesIndex>.AddedVersion => MetadataVersions.V390;
|
||||
static string IIndexType<InterfacesIndex>.TagPrefix => TagPrefix;
|
||||
|
||||
private int _value = value;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ public struct MethodIndex(int value) : IIndexType<MethodIndex>, IReadable, IEqua
|
||||
public const string TagPrefix = nameof(MethodIndex);
|
||||
|
||||
static string IIndexType<MethodIndex>.TagPrefix => TagPrefix;
|
||||
static StructVersion IIndexType<MethodIndex>.AddedVersion => MetadataVersions.V390;
|
||||
|
||||
private int _value = value;
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ public struct NestedTypeIndex(int value) : IIndexType<NestedTypeIndex>, IReadabl
|
||||
{
|
||||
public const string TagPrefix = nameof(NestedTypeIndex);
|
||||
|
||||
static string IIndexType<NestedTypeIndex>.TagPrefix => TagPrefix;
|
||||
static StructVersion IIndexType<NestedTypeIndex>.AddedVersion => MetadataVersions.V390;
|
||||
static string IIndexType<NestedTypeIndex>.TagPrefix => TagPrefix;
|
||||
|
||||
private int _value = value;
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ public struct ParameterIndex(int value) : IIndexType<ParameterIndex>, IReadable,
|
||||
{
|
||||
public const string TagPrefix = nameof(ParameterIndex);
|
||||
|
||||
static string IIndexType<ParameterIndex>.TagPrefix => TagPrefix;
|
||||
static StructVersion IIndexType<ParameterIndex>.AddedVersion => MetadataVersions.V390;
|
||||
static string IIndexType<ParameterIndex>.TagPrefix => TagPrefix;
|
||||
|
||||
private int _value = value;
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ public struct PropertyIndex(int value) : IIndexType<PropertyIndex>, IReadable, I
|
||||
{
|
||||
public const string TagPrefix = nameof(PropertyIndex);
|
||||
|
||||
static string IIndexType<PropertyIndex>.TagPrefix => TagPrefix;
|
||||
static StructVersion IIndexType<PropertyIndex>.AddedVersion => MetadataVersions.V390;
|
||||
static string IIndexType<PropertyIndex>.TagPrefix => TagPrefix;
|
||||
|
||||
private int _value = value;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ public struct TypeDefinitionIndex(int value) : IIndexType<TypeDefinitionIndex>,
|
||||
public const string TagPrefix = nameof(TypeDefinitionIndex);
|
||||
|
||||
static string IIndexType<TypeDefinitionIndex>.TagPrefix => TagPrefix;
|
||||
static StructVersion IIndexType<TypeDefinitionIndex>.AddedVersion => MetadataVersions.V390;
|
||||
|
||||
private int _value = value;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ public struct TypeIndex(int value) : IIndexType<TypeIndex>, IReadable, IEquatabl
|
||||
public const string TagPrefix = nameof(TypeIndex);
|
||||
|
||||
static string IIndexType<TypeIndex>.TagPrefix => TagPrefix;
|
||||
static StructVersion IIndexType<TypeIndex>.AddedVersion => MetadataVersions.V390;
|
||||
|
||||
private int _value = value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user