Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
this.priorityEnabled = enablePriority
let head: PriorityQueueNode<T>
let tail: PriorityQueueNode<T>
- let prevNode: PriorityQueueNode<T> | undefined
+ let prev: PriorityQueueNode<T> | undefined
let node: PriorityQueueNode<T> | undefined = this.tail
let buckets = 0
while (node != null) {
if (buckets === 0) {
tail = currentNode
}
- if (prevNode != null) {
- prevNode.next = currentNode
+ if (prev != null) {
+ prev.next = currentNode
}
- prevNode = currentNode
+ prev = currentNode
if (node.next == null) {
head = currentNode
}