Browse Source

Merge branch 'master' of git://github.com/icsharpcode/ILSpy into Debugger

newNRvisualizers
Eusebiu Marcu 15 years ago
parent
commit
bcc40ee8b1
  1. 8
      ICSharpCode.NRefactory/CSharp/Ast/AstNode.cs

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

@ -383,7 +383,7 @@ namespace ICSharpCode.NRefactory.CSharp
/// <summary> /// <summary>
/// Clones the whole subtree starting at this AST node. /// Clones the whole subtree starting at this AST node.
/// </summary> /// </summary>
/// <remarks>Annotations are copied over to the new nodes; and any annotations implementating ICloneable will be cloned.</remarks> /// <remarks>Annotations are copied over to the new nodes; and any annotations implementing ICloneable will be cloned.</remarks>
public AstNode Clone() public AstNode Clone()
{ {
AstNode copy = (AstNode)MemberwiseClone(); AstNode copy = (AstNode)MemberwiseClone();
@ -401,9 +401,9 @@ namespace ICSharpCode.NRefactory.CSharp
} }
// Finally, clone the annotation, if necessary // Finally, clone the annotation, if necessary
ICloneable annotations = copy.annotations as ICloneable; // read from copy (for thread-safety) ICloneable copiedAnnotations = copy.annotations as ICloneable; // read from copy (for thread-safety)
if (annotations != null) if (copiedAnnotations != null)
copy.annotations = annotations.Clone(); copy.annotations = copiedAnnotations.Clone();
return copy; return copy;
} }

Loading…
Cancel
Save