diff options
author | Paul Phillips <paulp@improving.org> | 2011-01-10 05:38:50 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-01-10 05:38:50 +0000 |
commit | d06ccf64f0bc8a0b86da21cd8118d4de02f93c6b (patch) | |
tree | bb283e143596cf825dfb2b255da9f8ff9bebaa55 | |
parent | 34d82221cca365ce6b57d7baaed58bac8152ac53 (diff) | |
download | scala-d06ccf64f0bc8a0b86da21cd8118d4de02f93c6b.tar.gz scala-d06ccf64f0bc8a0b86da21cd8118d4de02f93c6b.tar.bz2 scala-d06ccf64f0bc8a0b86da21cd8118d4de02f93c6b.zip |
Fixed a mis-deprecation step where remove was r...
Fixed a mis-deprecation step where remove was replaced with filterNot on
a mutable collection. Thanks to richard emberson for finding it. I used
what git fu I have searching for others, but no dice. No review.
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala b/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala index 82c09b6501..cdc18ed566 100644 --- a/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala +++ b/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala @@ -94,7 +94,7 @@ abstract class TreeBrowsers { /** Return the index'th child of parent */ def getChild(parent: Any, index: Int): AnyRef = - packChildren(parent).drop(index).head + packChildren(parent)(index) /** Return the number of children this 'parent' has */ def getChildCount(parent: Any): Int = @@ -102,16 +102,16 @@ abstract class TreeBrowsers { /** Return the index of the given child */ def getIndexOfChild(parent: Any, child: Any): Int = - packChildren(parent).dropWhile(c => c != child).length + packChildren(parent) indexOf child /** Return the root node */ def getRoot(): AnyRef = program /** Test whether the given node is a leaf */ - def isLeaf(node: Any): Boolean = packChildren(node).length == 0 + def isLeaf(node: Any): Boolean = packChildren(node).isEmpty def removeTreeModelListener(l: TreeModelListener): Unit = - listeners filterNot (_ == l) + listeners = listeners filterNot (_ == l) /** we ignore this message for now */ def valueForPathChanged(path: TreePath, newValue: Any) = () |