Skip to content

Commit 56348cf

Browse files
committed
fix multiple type declarations
1 parent 1c24e83 commit 56348cf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/methods/clipping/clipping_processor.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ function foreach_pair_of_maybe_intersecting_edges_in_order(
224224
else
225225
accelerator
226226
end
227+
228+
# Declare this now because it's used in multiple branches
229+
last_a_idx::Int = 0
227230

228231
if accelerator isa NestedLoop
229232
# if we don't have enough vertices in either of the polygons to merit a tree,
@@ -382,7 +385,7 @@ function foreach_pair_of_maybe_intersecting_edges_in_order(
382385
tree_a = NaturalIndexing.NaturalIndex(edges_a)
383386
tree_b = NaturalIndexing.NaturalIndex(edges_b)
384387

385-
last_a_idx = 1
388+
last_a_idx = 0
386389

387390
SpatialTreeInterface.dual_depth_first_search(Extents.intersects, tree_a, tree_b) do a_thinned_idx, b_thinned_idx
388391
a_edge_idx = indices_a[a_thinned_idx]

0 commit comments

Comments
 (0)