mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-17 13:52:09 +00:00
[get_turns] Fix signed indexes types, replace ints.
This commit is contained in:
@@ -559,7 +559,8 @@ struct get_turns_cs
|
||||
RobustPolicy const& robust_policy,
|
||||
Turns& turns,
|
||||
InterruptPolicy& interrupt_policy,
|
||||
int multi_index = -1, int ring_index = -1)
|
||||
signed_index_type multi_index = -1,
|
||||
signed_index_type ring_index = -1)
|
||||
{
|
||||
if ( boost::size(range) <= 1)
|
||||
{
|
||||
@@ -572,7 +573,8 @@ struct get_turns_cs
|
||||
cview_type cview(range);
|
||||
view_type view(cview);
|
||||
|
||||
typename boost::range_size<view_type>::type segments_count1 = boost::size(view) - 1;
|
||||
typedef typename boost::range_size<view_type>::type size_type;
|
||||
size_type segments_count1 = boost::size(view) - 1;
|
||||
|
||||
iterator_type it = boost::begin(view);
|
||||
|
||||
@@ -585,7 +587,7 @@ struct get_turns_cs
|
||||
|
||||
//char previous_side[2] = {0, 0};
|
||||
|
||||
int index = 0;
|
||||
signed_index_type index = 0;
|
||||
|
||||
for (iterator_type prev = it++;
|
||||
it != boost::end(view);
|
||||
@@ -624,7 +626,7 @@ struct get_turns_cs
|
||||
bp[0], bp[1], bp[2], bp[3],
|
||||
// NOTE: some dummy values could be passed below since this would be called only for Polygons and Boxes
|
||||
index == 0,
|
||||
unsigned(index) == segments_count1,
|
||||
size_type(index) == segments_count1,
|
||||
robust_policy,
|
||||
turns, interrupt_policy);
|
||||
// Future performance enhancement:
|
||||
@@ -729,7 +731,7 @@ struct get_turns_polygon_cs
|
||||
int source_id2, Box const& box,
|
||||
RobustPolicy const& robust_policy,
|
||||
Turns& turns, InterruptPolicy& interrupt_policy,
|
||||
int multi_index = -1)
|
||||
signed_index_type multi_index = -1)
|
||||
{
|
||||
typedef typename geometry::ring_type<Polygon>::type ring_type;
|
||||
|
||||
@@ -747,7 +749,7 @@ struct get_turns_polygon_cs
|
||||
turns, interrupt_policy,
|
||||
multi_index, -1);
|
||||
|
||||
int i = 0;
|
||||
signed_index_type i = 0;
|
||||
|
||||
typename interior_return_type<Polygon const>::type
|
||||
rings = interior_rings(polygon);
|
||||
@@ -786,7 +788,7 @@ struct get_turns_multi_polygon_cs
|
||||
Multi const
|
||||
>::type iterator_type;
|
||||
|
||||
int i = 0;
|
||||
signed_index_type i = 0;
|
||||
for (iterator_type it = boost::begin(multi);
|
||||
it != boost::end(multi);
|
||||
++it, ++i)
|
||||
|
||||
Reference in New Issue
Block a user