Skip to content

Commit

Permalink
core: stdcm: set block to route map before other checks
Browse files Browse the repository at this point in the history
  • Loading branch information
eckter committed Apr 23, 2024
1 parent b86407f commit c23092b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ private class InfraExplorerImpl(
var pathStarted = incrementalPath.pathStarted

for (block in routeBlocks) {
blockRoutes.getOrPut(block) { mutableSetOf() }.add(route)
blocks.add(block)
if (block == firstLocation?.edge) {
seenFirstBlock = true
}
Expand All @@ -298,13 +300,11 @@ private class InfraExplorerImpl(
travelledPathEnd = Distance.ZERO
)
)
blockRoutes.getOrPut(block) { mutableSetOf() }.add(route)
pathStarted = true
if (endPath) break // Can't extend any further
}
}
assert(seenFirstBlock)
blocks.addAll(routeBlocks)
routes.add(route)
for (i in 0 ..< nBlocksToSkip) moveForward()
for (pathFragment in pathFragments) incrementalPath.extend(pathFragment)
Expand Down

0 comments on commit c23092b

Please sign in to comment.