Skip to content

Commit

Permalink
Make date line pointer static with hashCode
Browse files Browse the repository at this point in the history
  • Loading branch information
jspricke committed Jul 11, 2021
1 parent 9d0a072 commit f5eb560
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@ class Lines {
}
msg += " --"

return Line(++fakePointerCounter, LineSpec.Type.Other, tstamp, "--", msg,
var datePointer = MAX_C_POINTER_VALUE shl 2 + newDate.getYear() shl 32
+ newDate.getDayOfYear() shl 20
if (oldDate != null) {
datePointer += oldDate.getYear() shl 16 + oldDate.getDayOfYear()
}
return Line(datePointer, LineSpec.Type.Other, tstamp, "--", msg,
nick = null, isVisible = true, isHighlighted = false,
LineSpec.DisplayAs.Unspecified, LineSpec.NotifyLevel.Low)
}
Expand Down

0 comments on commit f5eb560

Please sign in to comment.