|
|
@ -152,6 +152,8 @@ namespace ICSharpCode.Decompiler.IL.Transforms |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
if (!MatchIncrement(secondToLast, out var incrementVariable)) |
|
|
|
if (!MatchIncrement(secondToLast, out var incrementVariable)) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
if (incrementVariable.Kind == VariableKind.Parameter) |
|
|
|
|
|
|
|
return false; |
|
|
|
if (!condition.Descendants.Any(inst => inst.MatchLdLoc(incrementVariable))) |
|
|
|
if (!condition.Descendants.Any(inst => inst.MatchLdLoc(incrementVariable))) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
context.Step("Transform to for loop", loop); |
|
|
|
context.Step("Transform to for loop", loop); |
|
|
|