X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ffixed-priority-queue.ts;h=78ba2aff39d0b9604b990b85627847c986b75ad5;hb=02c769d09f7eeb7e154ea12a03556ac8d60dd8a0;hp=1204cf8153c7a7e8b9b9f4e774f4528ba5e9bdab;hpb=3451940fcbcf9750ad6e702ca296be7f8560408e;p=poolifier.git 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 }