Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed Apr 26, 2015
1 parent 8fb7d74 commit 2abc86d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ sealed trait Vector extends Serializable {
*/
override def hashCode(): Int = {
// This is a reference implementation. It calls return in foreachActive, which is slow.
// Subclasses should override it with optimized implementation.
var result: Int = 31 + size
this.foreachActive { (index, value) =>
if (index < 16) {
// ignore explict 0 for comparison between sparse and dense
// ignore explicit 0 for comparison between sparse and dense
if (value != 0) {
result = 31 * result + index
val bits = java.lang.Double.doubleToLongBits(value)
Expand Down

0 comments on commit 2abc86d

Please sign in to comment.