Use TryGetValue to speed it up a little
This commit is contained in:
parent
50e7d28ddf
commit
9e1412a6ae
|
@ -81,8 +81,9 @@ namespace de4dot.code.renamer {
|
|||
|
||||
public virtual TypeNames merge(TypeNames other) {
|
||||
foreach (var pair in other.typeNames) {
|
||||
if (typeNames.ContainsKey(pair.Key))
|
||||
typeNames[pair.Key].merge(pair.Value);
|
||||
NameCreator nc;
|
||||
if (typeNames.TryGetValue(pair.Key, out nc))
|
||||
nc.merge(pair.Value);
|
||||
else
|
||||
typeNames[pair.Key] = pair.Value.clone();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user