From 3cde99b2e7aedc586c598fc2dbda3c7e43f796db Mon Sep 17 00:00:00 2001 From: de4dot Date: Thu, 8 Mar 2012 17:57:35 +0100 Subject: [PATCH] Remove overrides field --- de4dot.code/renamer/asmmodules/TypeDef.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/de4dot.code/renamer/asmmodules/TypeDef.cs b/de4dot.code/renamer/asmmodules/TypeDef.cs index ad989f2c..7572365c 100644 --- a/de4dot.code/renamer/asmmodules/TypeDef.cs +++ b/de4dot.code/renamer/asmmodules/TypeDef.cs @@ -497,13 +497,7 @@ namespace de4dot.code.renamer.asmmodules { } } - Dictionary overrideMethods; void initializeInterfaceMethods(MethodNameGroups groups) { - if (baseType != null) - overrideMethods = new Dictionary(baseType.typeDef.overrideMethods); - else - overrideMethods = new Dictionary(); - initializeAllInterfaces(); if (TypeDefinition.IsInterface) @@ -611,9 +605,7 @@ namespace de4dot.code.renamer.asmmodules { continue; } - var oldMethod = interfaceMethodInfos.addMethod(overrideMethod.DeclaringType, ifaceMethod, classMethod); - if (oldMethod != classMethod) - overrideMethods[new MethodDefKey(classMethod)] = true; + interfaceMethodInfos.addMethod(overrideMethod.DeclaringType, ifaceMethod, classMethod); } } @@ -644,7 +636,7 @@ namespace de4dot.code.renamer.asmmodules { foreach (var pair in info.IfaceMethodToClassMethod) { if (pair.Value == null) continue; - if (overrideMethods.ContainsKey(new MethodDefKey(pair.Value))) + if (pair.Key.methodDef.MethodDefinition.Name != pair.Value.MethodDefinition.Name) continue; groups.same(pair.Key.methodDef, pair.Value); }