@@ -232,21 +232,20 @@ struct traversal
232
232
}
233
233
234
234
template <signed_size_type segment_identifier::*Member>
235
- inline bool select_source_generic (bool switch_source ,
235
+ inline bool select_source_generic (turn_type const & turn ,
236
236
segment_identifier const & current,
237
237
segment_identifier const & previous) const
238
238
{
239
- return switch_source
239
+ return turn. switch_source
240
240
? current.*Member != previous.*Member
241
241
: current.*Member == previous.*Member;
242
242
}
243
243
244
- inline bool select_source (signed_size_type turn_index ,
244
+ inline bool select_source (turn_type const & turn ,
245
245
segment_identifier const & candidate_seg_id,
246
246
segment_identifier const & previous_seg_id) const
247
247
{
248
248
// For uu/ii, only switch sources if indicated
249
- turn_type const & turn = m_turns[turn_index];
250
249
251
250
#if defined(BOOST_GEOMETRY_DEBUG_TRAVERSAL_SWITCH_DETECTOR)
252
251
if (turn.switch_source )
@@ -263,19 +262,19 @@ struct traversal
263
262
{
264
263
// Buffer does not use source_index (always 0).
265
264
return select_source_generic<&segment_identifier::multi_index>(
266
- turn. switch_source , candidate_seg_id, previous_seg_id);
265
+ turn, candidate_seg_id, previous_seg_id);
267
266
}
268
267
269
268
if (is_self_turn<OverlayType>(turn))
270
269
{
271
270
// Also, if it is a self-turn, stay on same ring (multi/ring)
272
271
return select_source_generic<&segment_identifier::multi_index>(
273
- turn. switch_source , candidate_seg_id, previous_seg_id);
272
+ turn, candidate_seg_id, previous_seg_id);
274
273
}
275
274
276
275
// Use source_index
277
276
return select_source_generic<&segment_identifier::source_index>(
278
- turn. switch_source , candidate_seg_id, previous_seg_id);
277
+ turn, candidate_seg_id, previous_seg_id);
279
278
}
280
279
281
280
inline bool traverse_possible (signed_size_type turn_index) const
@@ -342,7 +341,6 @@ struct traversal
342
341
343
342
inline
344
343
bool select_noncc_operation (turn_type const & turn,
345
- signed_size_type turn_index,
346
344
segment_identifier const & previous_seg_id,
347
345
int & selected_op_index) const
348
346
{
@@ -355,7 +353,7 @@ struct traversal
355
353
if (op.operation == target_operation
356
354
&& ! op.visited .finished ()
357
355
&& ! op.visited .visited ()
358
- && (! result || select_source (turn_index , op.seg_id , previous_seg_id)))
356
+ && (! result || select_source (turn , op.seg_id , previous_seg_id)))
359
357
{
360
358
selected_op_index = i;
361
359
debug_traverse (turn, op, " Candidate" );
@@ -368,7 +366,6 @@ struct traversal
368
366
369
367
inline
370
368
bool select_operation (const turn_type& turn,
371
- signed_size_type turn_index,
372
369
signed_size_type start_turn_index,
373
370
segment_identifier const & previous_seg_id,
374
371
int & selected_op_index) const
@@ -382,7 +379,7 @@ struct traversal
382
379
}
383
380
else
384
381
{
385
- result = select_noncc_operation (turn, turn_index,
382
+ result = select_noncc_operation (turn,
386
383
previous_seg_id, selected_op_index);
387
384
}
388
385
if (result)
@@ -878,7 +875,7 @@ struct traversal
878
875
return false ;
879
876
}
880
877
881
- if (! select_operation (current_turn, turn_index,
878
+ if (! select_operation (current_turn,
882
879
start_turn_index,
883
880
previous_seg_id,
884
881
op_index))
0 commit comments