From 4ad3a82f0c72c20b89be37ee4142441bef20a157 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 7 Jul 2025 10:28:36 +0200 Subject: [PATCH] refactor: cleanup priority queue code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/queues/priority-queue.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/queues/priority-queue.ts b/src/queues/priority-queue.ts index ee6a0d26b..cfcf5ca0c 100644 --- a/src/queues/priority-queue.ts +++ b/src/queues/priority-queue.ts @@ -4,7 +4,6 @@ import { FixedPriorityQueue } from './fixed-priority-queue.js' import { FixedQueue } from './fixed-queue.js' import { defaultBucketSize, - type FixedQueueNode, type IFixedQueue, type PriorityQueueNode, } from './queue-types.js' @@ -223,18 +222,13 @@ export class PriorityQueue { } } - private getPriorityQueueNode ( - nodeArray?: (FixedQueueNode | undefined)[] - ): PriorityQueueNode { + private getPriorityQueueNode (): PriorityQueueNode { let fixedQueue: IFixedQueue if (this.priorityEnabled) { fixedQueue = new FixedPriorityQueue(this.bucketSize) } else { fixedQueue = new FixedQueue(this.bucketSize) } - if (nodeArray != null) { - fixedQueue.nodeArray = nodeArray - } return fixedQueue } } -- 2.43.0