diff options
author | Simon Ochsenreither <simon@ochsenreither.de> | 2014-10-15 22:09:16 +0200 |
---|---|---|
committer | Simon Ochsenreither <simon@ochsenreither.de> | 2014-10-24 10:13:46 +0200 |
commit | da9bedce4c42e14f9d6f4ff38fe3a38432fd9e12 (patch) | |
tree | 4c2e49e588fdcb620b2b01f7c60449ad80b133f8 /src/library | |
parent | f08e96571479552b103b15cc2d40ea5454999546 (diff) | |
download | scala-da9bedce4c42e14f9d6f4ff38fe3a38432fd9e12.tar.gz scala-da9bedce4c42e14f9d6f4ff38fe3a38432fd9e12.tar.bz2 scala-da9bedce4c42e14f9d6f4ff38fe3a38432fd9e12.zip |
SI-8916 Further fixes with -Ywarn-unused included
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/collection/immutable/List.scala | 1 | ||||
-rw-r--r-- | src/library/scala/collection/mutable/AnyRefMap.scala | 4 | ||||
-rw-r--r-- | src/library/scala/collection/mutable/LongMap.scala | 4 |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/library/scala/collection/immutable/List.scala b/src/library/scala/collection/immutable/List.scala index aa9dec2761..9bfefc3de2 100644 --- a/src/library/scala/collection/immutable/List.scala +++ b/src/library/scala/collection/immutable/List.scala @@ -290,7 +290,6 @@ sealed abstract class List[+A] extends AbstractSeq[A] if (this eq Nil) Nil.asInstanceOf[That] else { var rest = this var h: ::[B] = null - var x: A = null.asInstanceOf[A] // Special case for first element do { val x: Any = pf.applyOrElse(rest.head, List.partialNotApplied) diff --git a/src/library/scala/collection/mutable/AnyRefMap.scala b/src/library/scala/collection/mutable/AnyRefMap.scala index 47fb66744e..fccc9d83e6 100644 --- a/src/library/scala/collection/mutable/AnyRefMap.scala +++ b/src/library/scala/collection/mutable/AnyRefMap.scala @@ -224,7 +224,7 @@ extends AbstractMap[K, V] override def put(key: K, value: V): Option[V] = { val h = hashOf(key) val k = key - var i = seekEntryOrOpen(h, k) + val i = seekEntryOrOpen(h, k) if (i < 0) { val j = i & IndexMask _hashes(j) = h @@ -251,7 +251,7 @@ extends AbstractMap[K, V] override def update(key: K, value: V): Unit = { val h = hashOf(key) val k = key - var i = seekEntryOrOpen(h, k) + val i = seekEntryOrOpen(h, k) if (i < 0) { val j = i & IndexMask _hashes(j) = h diff --git a/src/library/scala/collection/mutable/LongMap.scala b/src/library/scala/collection/mutable/LongMap.scala index ef488a3697..5fafe23d9f 100644 --- a/src/library/scala/collection/mutable/LongMap.scala +++ b/src/library/scala/collection/mutable/LongMap.scala @@ -81,7 +81,7 @@ extends AbstractMap[Long, V] private def toIndex(k: Long): Int = { // Part of the MurmurHash3 32 bit finalizer val h = ((k ^ (k >>> 32)) & 0xFFFFFFFFL).toInt - var x = (h ^ (h >>> 16)) * 0x85EBCA6B + val x = (h ^ (h >>> 16)) * 0x85EBCA6B (x ^ (x >>> 13)) & mask } @@ -311,7 +311,7 @@ extends AbstractMap[Long, V] } } else { - var i = seekEntryOrOpen(key) + val i = seekEntryOrOpen(key) if (i < 0) { val j = i & IndexMask _keys(j) = key |