From: Jérôme Benoit Date: Sun, 26 May 2024 14:52:08 +0000 (+0200) Subject: refactor: trivial code cleanups X-Git-Tag: v4.0.13~12 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=02c769d09f7eeb7e154ea12a03556ac8d60dd8a0;p=poolifier.git refactor: trivial code cleanups Signed-off-by: Jérôme Benoit --- diff --git a/src/fixed-priority-queue.ts b/src/fixed-priority-queue.ts index 1204cf81..78ba2aff 100644 --- a/src/fixed-priority-queue.ts +++ b/src/fixed-priority-queue.ts @@ -54,7 +54,7 @@ export class FixedPriorityQueue { inserted = true break } - index++ + ++index if (index === nodeArrayLength) { index = 0 } @@ -111,8 +111,8 @@ export class FixedPriorityQueue { } } const value = this.nodeArray[index].data - index++ - i++ + ++index + ++i if (index === this.nodeArray.length) { index = 0 }