From 23514f1d0e2560bf785bf6eeb74301486a498182 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Fri, 30 Jun 2023 18:04:42 +0200 Subject: [PATCH] Indexed for-loop --- .../src/main/kotlin/org/pgpainless/wot/dijkstra/sq/Path.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/sq/Path.kt b/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/sq/Path.kt index 820f7369..9a2c01eb 100644 --- a/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/sq/Path.kt +++ b/wot-dijkstra/src/main/kotlin/org/pgpainless/wot/dijkstra/sq/Path.kt @@ -100,8 +100,7 @@ class Path( } var cyclic = root.fingerprint == certification.target.fingerprint - for (i in 0 until edges.size) { - val edge = edges[i] + for ((i, edge) in edges.withIndex()) { if (cyclic) { break }