X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ffixed-priority-queue.ts;h=1cc1480a1b5521d18369cff68a4c2282971f6f85;hb=df01d9a8a7053a4ff33e704cd5493f0a7bc4e2e7;hp=a3de02095fb4fcd34874cea8efbf67c703d01e5c;hpb=6e5d7052fe741b50e68f8614b33d3754be41415f;p=poolifier.git diff --git a/src/fixed-priority-queue.ts b/src/fixed-priority-queue.ts index a3de0209..1cc1480a 100644 --- a/src/fixed-priority-queue.ts +++ b/src/fixed-priority-queue.ts @@ -76,8 +76,7 @@ export class FixedPriorityQueue { for (let i = 0; i < this.size; i++) { if (this.nodeArray[index].priority > priority) { this.nodeArray.splice(index, 0, { data, priority }) - this.nodeArray.length !== this.capacity && - (this.nodeArray.length = this.capacity) + this.nodeArray.length = this.capacity inserted = true break }