Browse Source

remove redundant check

newNRvisualizers
turbanoff 14 years ago
parent
commit
24f1637093
  1. 3
      ICSharpCode.NRefactory.CSharp/Ast/AstNode.cs

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

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

Loading…
Cancel
Save