Browse Source

Merge pull request #415 from turbanoff/master

remove redundant OrderBy: all handlers will have same TryStart.Offset after Where
pull/426/merge
Daniel Grunwald 11 years ago
parent
commit
2fcf89b99d
  1. 2
      ICSharpCode.Decompiler/ILAst/ILAstBuilder.cs

2
ICSharpCode.Decompiler/ILAst/ILAstBuilder.cs

@ -652,7 +652,7 @@ namespace ICSharpCode.Decompiler.ILAst @@ -652,7 +652,7 @@ namespace ICSharpCode.Decompiler.ILAst
// Find the first and widest scope
int tryStart = ehs.Min(eh => eh.TryStart.Offset);
int tryEnd = ehs.Where(eh => eh.TryStart.Offset == tryStart).Max(eh => eh.TryEnd.Offset);
var handlers = ehs.Where(eh => eh.TryStart.Offset == tryStart && eh.TryEnd.Offset == tryEnd).OrderBy(eh => eh.TryStart.Offset).ToList();
var handlers = ehs.Where(eh => eh.TryStart.Offset == tryStart && eh.TryEnd.Offset == tryEnd).ToList();
// Remember that any part of the body migt have been removed due to unreachability

Loading…
Cancel
Save