diff options
author | jbevain <jbevain@gmail.com> | 2011-05-21 10:34:29 +0400 |
---|---|---|
committer | jbevain <jbevain@gmail.com> | 2011-05-21 10:34:29 +0400 |
commit | cce1fb2c2b978a2d7790c895ef39d7479534fe1d (patch) | |
tree | d52f6e18ec7c6d19aca6d2129f39924d6a802788 /Mono.Cecil | |
parent | 154357af16659bc52750b42b72ff1444c01973df (diff) |
code cleanup
Diffstat (limited to 'Mono.Cecil')
-rw-r--r-- | Mono.Cecil/AssemblyReader.cs | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/Mono.Cecil/AssemblyReader.cs b/Mono.Cecil/AssemblyReader.cs index fd62622..96d0e5a 100644 --- a/Mono.Cecil/AssemblyReader.cs +++ b/Mono.Cecil/AssemblyReader.cs @@ -2594,21 +2594,15 @@ namespace Mono.Cecil { var file_name = ReadString (); var modules = module.ModuleReferences; - ModuleReference reference = null; + ModuleReference reference; for (int i = 0; i < modules.Count; i++) { - var module_reference = modules [i]; - if (module_reference.Name != file_name) - continue; - - reference = module_reference; - break; - } - - if (reference == null) { - reference = new ModuleReference (file_name); - modules.Add (reference); + reference = modules [i]; + if (reference.Name == file_name) + return reference; } + reference = new ModuleReference (file_name); + modules.Add (reference); return reference; } |