Browse Source

Merge pull request #43 from turbanoff/patch-1

remove redundant check
newNRvisualizers
Daniel Grunwald 14 years ago
parent
commit
0179c76aa2
  1. 3
      ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs

3
ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs

@ -483,7 +483,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -483,7 +483,7 @@ namespace ICSharpCode.NRefactory.CSharp
newNode.SetRole(this.Role);
newNode.prevSibling = prevSibling;
newNode.nextSibling = nextSibling;
if (parent != null) {
if (prevSibling != null) {
Debug.Assert (prevSibling.nextSibling == this);
prevSibling.nextSibling = newNode;
@ -502,7 +502,6 @@ namespace ICSharpCode.NRefactory.CSharp @@ -502,7 +502,6 @@ namespace ICSharpCode.NRefactory.CSharp
prevSibling = null;
nextSibling = null;
}
}
public AstNode ReplaceWith (Func<AstNode, AstNode> replaceFunction)
{

Loading…
Cancel
Save