diff options
author | Janek Bogucki <janekdb@gmail.com> | 2016-03-08 18:45:47 +0000 |
---|---|---|
committer | Janek Bogucki <janekdb@gmail.com> | 2016-03-09 21:53:45 +0000 |
commit | d0ca6ed277f3d482a0032c312fe2b0d6a48fb6cc (patch) | |
tree | 307a453047b373f273957b24889673c7e188e924 /src/reflect/scala/reflect/internal/util | |
parent | 7a21ee22c34969912132e83fe3bd674f6c804840 (diff) | |
download | scala-d0ca6ed277f3d482a0032c312fe2b0d6a48fb6cc.tar.gz scala-d0ca6ed277f3d482a0032c312fe2b0d6a48fb6cc.tar.bz2 scala-d0ca6ed277f3d482a0032c312fe2b0d6a48fb6cc.zip |
Fix var spelling in WeakHashSet
WeakHashSet is internal so an exception was made against binary
compatibility to allow the var to be made private.
Diffstat (limited to 'src/reflect/scala/reflect/internal/util')
-rw-r--r-- | src/reflect/scala/reflect/internal/util/WeakHashSet.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/reflect/scala/reflect/internal/util/WeakHashSet.scala b/src/reflect/scala/reflect/internal/util/WeakHashSet.scala index f8dfa720d5..fffe4dd881 100644 --- a/src/reflect/scala/reflect/internal/util/WeakHashSet.scala +++ b/src/reflect/scala/reflect/internal/util/WeakHashSet.scala @@ -56,9 +56,9 @@ final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: D /** * the limit at which we'll increase the size of the hash table */ - var threshhold = computeThreshHold + private[this] var threshold = computeThreshold - private[this] def computeThreshHold: Int = (table.size * loadFactor).ceil.toInt + private[this] def computeThreshold: Int = (table.size * loadFactor).ceil.toInt /** * find the bucket associated with an element's hash code @@ -121,7 +121,7 @@ final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: D private[this] def resize() { val oldTable = table table = new Array[Entry[A]](oldTable.size * 2) - threshhold = computeThreshHold + threshold = computeThreshold @tailrec def tableLoop(oldBucket: Int): Unit = if (oldBucket < oldTable.size) { @@ -176,7 +176,7 @@ final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: D def add() = { table(bucket) = new Entry(elem, hash, oldHead, queue) count += 1 - if (count > threshhold) resize() + if (count > threshold) resize() elem } @@ -206,7 +206,7 @@ final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: D def add() { table(bucket) = new Entry(elem, hash, oldHead, queue) count += 1 - if (count > threshhold) resize() + if (count > threshold) resize() } @tailrec @@ -252,7 +252,7 @@ final class WeakHashSet[A <: AnyRef](val initialCapacity: Int, val loadFactor: D // empty this set override def clear(): Unit = { table = new Array[Entry[A]](table.size) - threshhold = computeThreshHold + threshold = computeThreshold count = 0 // drain the queue - doesn't do anything because we're throwing away all the values anyway |