summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/doc/model/TreeFactory.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-11-03 06:29:38 -0700
committerPaul Phillips <paulp@improving.org>2012-11-03 07:01:15 -0700
commit9c09c170998f74fba03990977b285e3121db32a6 (patch)
treeee12a85233e6927e5ec3698fc83f26fb46ad43e6 /src/compiler/scala/tools/nsc/doc/model/TreeFactory.scala
parentd3da3ef83293c0e174e07aba643b3a1f46c110c5 (diff)
downloadscala-9c09c170998f74fba03990977b285e3121db32a6.tar.gz
scala-9c09c170998f74fba03990977b285e3121db32a6.tar.bz2
scala-9c09c170998f74fba03990977b285e3121db32a6.zip
Removing unused locals and making vars into vals.
According to "git diff" the difference from master to this commit includes: Minus: 112 vals, 135 vars Plus: 165 vals, 2 vars Assuming all the removed ones were vals, which is true from 10K feet, it suggests I removed 80 unused vals and turned 133 vars into vals. There are a few other -Xlint driven improvements bundled with this, like putting double-parentheses around Some((x, y)) so it doesn't trigger the "adapting argument list" warning.
Diffstat (limited to 'src/compiler/scala/tools/nsc/doc/model/TreeFactory.scala')
-rwxr-xr-xsrc/compiler/scala/tools/nsc/doc/model/TreeFactory.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/model/TreeFactory.scala b/src/compiler/scala/tools/nsc/doc/model/TreeFactory.scala
index bd7534ded4..b972649194 100755
--- a/src/compiler/scala/tools/nsc/doc/model/TreeFactory.scala
+++ b/src/compiler/scala/tools/nsc/doc/model/TreeFactory.scala
@@ -21,7 +21,7 @@ trait TreeFactory { thisTreeFactory: ModelFactory with TreeFactory =>
def makeTree(rhs: Tree): Option[TreeEntity] = {
- var expr = new StringBuilder
+ val expr = new StringBuilder
var refs = new immutable.TreeMap[Int, (Entity, Int)] // start, (Entity to be linked to , end)
rhs.pos match {
@@ -39,7 +39,7 @@ trait TreeFactory { thisTreeFactory: ModelFactory with TreeFactory =>
* stores it in tree.refs with its position
*/
def makeLink(rhs: Tree){
- var start = pos.startOrPoint - firstIndex
+ val start = pos.startOrPoint - firstIndex
val end = pos.endOrPoint - firstIndex
if(start != end) {
var asym = rhs.symbol