mirror of
https://github.com/boostorg/geometry.git
synced 2026-02-17 13:52:09 +00:00
[algorithms][is_valid] fix some wrong usages of std::size_t (should
have been int)
This commit is contained in:
@@ -198,7 +198,7 @@ public:
|
||||
|
||||
// inserts a ring vertex in the graph and returns its handle
|
||||
// ring id's are zero-based (so the first interior ring has id 1)
|
||||
vertex_handle add_vertex(std::size_t id)
|
||||
vertex_handle add_vertex(int id)
|
||||
{
|
||||
return m_vertices.insert(vertex(id)).first;
|
||||
}
|
||||
@@ -212,7 +212,7 @@ public:
|
||||
if ( res.second )
|
||||
{
|
||||
// a new element is inserted
|
||||
res.first->id( m_num_rings + m_num_turns );
|
||||
res.first->id( static_cast<int>(m_num_rings + m_num_turns) );
|
||||
++m_num_turns;
|
||||
}
|
||||
return res.first;
|
||||
|
||||
@@ -155,11 +155,6 @@ protected:
|
||||
|
||||
|
||||
|
||||
static inline std::size_t get_vertex_id(int ring_id)
|
||||
{
|
||||
return static_cast<std::size_t>(ring_id + 1);
|
||||
}
|
||||
|
||||
template <typename TurnIterator>
|
||||
static inline bool has_connected_interior(Polygon const& polygon,
|
||||
TurnIterator first,
|
||||
@@ -175,9 +170,9 @@ protected:
|
||||
for (TurnIterator tit = first; tit != beyond; ++tit)
|
||||
{
|
||||
typename graph::vertex_handle v1 = g.add_vertex
|
||||
( get_vertex_id(tit->operations[0].seg_id.ring_index) );
|
||||
( tit->operations[0].seg_id.ring_index + 1 );
|
||||
typename graph::vertex_handle v2 = g.add_vertex
|
||||
( get_vertex_id(tit->operations[0].other_id.ring_index) );
|
||||
( tit->operations[0].other_id.ring_index + 1 );
|
||||
typename graph::vertex_handle vip = g.add_vertex(tit->point);
|
||||
|
||||
g.add_edge(v1, vip);
|
||||
|
||||
Reference in New Issue
Block a user