refactor: trivial code cleanups
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 26 May 2024 14:52:08 +0000 (16:52 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 26 May 2024 14:52:08 +0000 (16:52 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
src/fixed-priority-queue.ts

index 1204cf8153c7a7e8b9b9f4e774f4528ba5e9bdab..78ba2aff39d0b9604b990b85627847c986b75ad5 100644 (file)
@@ -54,7 +54,7 @@ export class FixedPriorityQueue<T> {
         inserted = true
         break
       }
-      index++
+      ++index
       if (index === nodeArrayLength) {
         index = 0
       }
@@ -111,8 +111,8 @@ export class FixedPriorityQueue<T> {
           }
         }
         const value = this.nodeArray[index].data
-        index++
-        i++
+        ++index
+        ++i
         if (index === this.nodeArray.length) {
           index = 0
         }