From 614f5c0e01ca42eb8b9f8a57228b43d678895048 Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Sat, 2 Nov 2019 18:48:44 +0100 Subject: [PATCH] Clean up TODOs --- Il2CppInspector/FileFormatReaders/MachOReader.cs | 2 +- Il2CppInspector/Reflection/MethodBase.cs | 2 +- Il2CppInspector/Reflection/TypeInfo.cs | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Il2CppInspector/FileFormatReaders/MachOReader.cs b/Il2CppInspector/FileFormatReaders/MachOReader.cs index 12a7da8..7142424 100644 --- a/Il2CppInspector/FileFormatReaders/MachOReader.cs +++ b/Il2CppInspector/FileFormatReaders/MachOReader.cs @@ -140,7 +140,7 @@ namespace Il2CppInspector foreach (var section in sections) { var rels = ReadArray(section.ImageRelocOffset, section.NumRelocEntries); - // TODO: Implement + // TODO: Implement Mach-O relocations if (rels.Any()) { Console.WriteLine("Mach-O file contains relocations (feature not yet implemented)"); break; diff --git a/Il2CppInspector/Reflection/MethodBase.cs b/Il2CppInspector/Reflection/MethodBase.cs index 96bacb2..c68bafb 100644 --- a/Il2CppInspector/Reflection/MethodBase.cs +++ b/Il2CppInspector/Reflection/MethodBase.cs @@ -66,7 +66,7 @@ namespace Il2CppInspector.Reflection // Generic method definition? if (Definition.genericContainerIndex >= 0) { IsGenericMethod = true; - IsGenericMethodDefinition = true; // TODO: Only if all of the parameters are unresolved generic type parameters + IsGenericMethodDefinition = true; ContainsGenericParameters = true; // Store the generic type parameters for later instantiation diff --git a/Il2CppInspector/Reflection/TypeInfo.cs b/Il2CppInspector/Reflection/TypeInfo.cs index ce88753..cfe2780 100644 --- a/Il2CppInspector/Reflection/TypeInfo.cs +++ b/Il2CppInspector/Reflection/TypeInfo.cs @@ -109,8 +109,6 @@ namespace Il2CppInspector.Reflection { + (GenericTypeArguments != null ? "[" + string.Join(",", GenericTypeArguments.Select(x => x.FullName ?? x.Name)) + "]" : "") + (IsArray? "[]" : ""); - // TODO: Alot of other generics stuff - public List GenericTypeParameters { get; } public List GenericTypeArguments { get; } @@ -168,8 +166,6 @@ namespace Il2CppInspector.Reflection { public Array GetEnumValues() => IsEnum? DeclaredFields.Where(x => x.Name != "value__").Select(x => x.DefaultValue).ToArray() : throw new InvalidOperationException("Type is not an enumeration"); - // TODO: Generic stuff - // Initialize from specified type index in metadata // Top-level types @@ -195,7 +191,7 @@ namespace Il2CppInspector.Reflection { if (Definition.genericContainerIndex >= 0) { IsGenericType = true; IsGenericParameter = false; - IsGenericTypeDefinition = true; // TODO: Only if all of the parameters are unresolved generic type parameters + IsGenericTypeDefinition = true; // All of our generic type parameters are unresolved ContainsGenericParameters = true; // Store the generic type parameters for later instantiation