Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ward <matt.ward@xamarin.com>2015-11-19 12:43:19 +0300
committerMatt Ward <matt.ward@xamarin.com>2015-11-19 12:43:19 +0300
commit3464fad275c48d7c4ffb3602dfcc66afa467b76a (patch)
tree10db040d0a2cf55165ac8d43dd24b60ca297a887 /main/contrib/ICSharpCode.Decompiler/Ast/Transforms/IntroduceUnsafeModifier.cs
parentd94562154c646871e5af85aeb9eca1ece86776f9 (diff)
parent203ed0aabb6a60c7bb18f3b7b490588ab09cf38e (diff)
Merge branch 'master' into aspnet-project-wizard
Conflicts: main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj main/tests/UnitTests/UnitTests.csproj
Diffstat (limited to 'main/contrib/ICSharpCode.Decompiler/Ast/Transforms/IntroduceUnsafeModifier.cs')
-rw-r--r--main/contrib/ICSharpCode.Decompiler/Ast/Transforms/IntroduceUnsafeModifier.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/contrib/ICSharpCode.Decompiler/Ast/Transforms/IntroduceUnsafeModifier.cs b/main/contrib/ICSharpCode.Decompiler/Ast/Transforms/IntroduceUnsafeModifier.cs
index 43548e38d4..a9e72564f3 100644
--- a/main/contrib/ICSharpCode.Decompiler/Ast/Transforms/IntroduceUnsafeModifier.cs
+++ b/main/contrib/ICSharpCode.Decompiler/Ast/Transforms/IntroduceUnsafeModifier.cs
@@ -35,7 +35,11 @@ namespace ICSharpCode.Decompiler.Ast.Transforms
protected override bool VisitChildren(AstNode node, object data)
{
bool result = false;
- for (AstNode child = node.FirstChild; child != null; child = child.NextSibling) {
+ AstNode next;
+ for (AstNode child = node.FirstChild; child != null; child = next) {
+ // Store next to allow the loop to continue
+ // if the visitor removes/replaces child.
+ next = child.NextSibling;
result |= child.AcceptVisitor(this, data);
}
if (result && node is EntityDeclaration && !(node is Accessor)) {