Remove ResolveGenericArguments(int) entirely

It's not really needed anymore, and it is clearer without that method.
This commit is contained in:
Robert Xiao
2020-04-10 04:22:21 -07:00
committed by Katy
parent f0124d9290
commit 71bf353ae0
2 changed files with 1 additions and 2 deletions

View File

@@ -141,7 +141,6 @@ namespace Il2CppInspector.Reflection
} }
// Get generic arguments from either a type or method instanceIndex from a MethodSpec // Get generic arguments from either a type or method instanceIndex from a MethodSpec
public List<TypeInfo> ResolveGenericArguments(int instanceIndex) => ResolveGenericArguments(Package.GenericInstances[instanceIndex]);
public List<TypeInfo> ResolveGenericArguments(Il2CppGenericInst inst) { public List<TypeInfo> ResolveGenericArguments(Il2CppGenericInst inst) {
// Get list of pointers to type parameters (both unresolved and concrete) // Get list of pointers to type parameters (both unresolved and concrete)

View File

@@ -153,7 +153,7 @@ namespace Il2CppInspector.Reflection
Attributes = methodDef.Attributes; Attributes = methodDef.Attributes;
IsGenericMethod = true; IsGenericMethod = true;
genericArguments = model.ResolveGenericArguments(spec.methodIndexIndex); genericArguments = model.ResolveGenericArguments(model.Package.GenericInstances[spec.methodIndexIndex]);
// Substitute matching generic type parameters with concrete type arguments // Substitute matching generic type parameters with concrete type arguments
foreach (var p in methodDef.DeclaredParameters) { foreach (var p in methodDef.DeclaredParameters) {