Change generic params/args to arrays
The C# functions for GetGenericParameters/GetGenericArguments use Type[], not lists, so we should conform to that. Also fix the definition of IsGenericTypeDefinition - because it's possible for a class to be instantiated with all generic parameters.
This commit is contained in:
@@ -146,12 +146,12 @@ namespace Il2CppInspector.Reflection
|
||||
}
|
||||
|
||||
// Get generic arguments from either a type or method instanceIndex from a MethodSpec
|
||||
public List<TypeInfo> ResolveGenericArguments(Il2CppGenericInst inst) {
|
||||
public TypeInfo[] ResolveGenericArguments(Il2CppGenericInst inst) {
|
||||
|
||||
// Get list of pointers to type parameters (both unresolved and concrete)
|
||||
var genericTypeArguments = Package.BinaryImage.ReadMappedWordArray(inst.type_argv, (int)inst.type_argc);
|
||||
|
||||
return genericTypeArguments.Select(a => GetTypeFromVirtualAddress((ulong) a)).ToList();
|
||||
return genericTypeArguments.Select(a => GetTypeFromVirtualAddress((ulong) a)).ToArray();
|
||||
}
|
||||
|
||||
// Get a TypeRef by its virtual address
|
||||
|
||||
Reference in New Issue
Block a user