fixes for bugs spotted by g++

This commit is contained in:
Andreas Fabri 2016-11-18 17:56:24 +01:00
parent 63dfd4f992
commit e4d2a7f2e1
3 changed files with 7 additions and 8 deletions

View File

@ -309,7 +309,7 @@ void coplanar_3_hull(InputIterator first, InputIterator beyond,
}
}
std::vector<boost::graph_traits<Polyhedron_3>::vertex_descriptor> vertices(CH_2.size());
std::vector<typename boost::graph_traits<Polyhedron_3>::vertex_descriptor> vertices(CH_2.size());
BOOST_FOREACH(const Point_3& p, CH_2){
vertices.push_back(add_vertex(p,P));
}

View File

@ -76,9 +76,9 @@ bool is_locally_convex(Polyhedron P, Vpmap vpmap, Facet_handle f_hdl, const Trai
template<class Polyhedron, class Traits>
bool is_strongly_convex_3(const Polyhedron& P, const Traits& traits)
{
typedef boost::graph_traits<Polyhedron>::face_descriptor face_descriptor;
typedef boost::graph_traits<Polyhedron>::vertex_iterator vertex_iterator;
typedef boost::graph_traits<Polyhedron>::face_iterator face_iterator;
typedef typename boost::graph_traits<Polyhedron>::face_descriptor face_descriptor;
typedef typename boost::graph_traits<Polyhedron>::vertex_iterator vertex_iterator;
typedef typename boost::graph_traits<Polyhedron>::face_iterator face_iterator;
typedef typename Traits::Point_3 Point_3;
typedef typename Traits::Ray_3 Ray_3;
@ -213,17 +213,16 @@ bool all_points_inside( ForwardIterator first,
const Traits& traits)
{
typedef typename Traits::Plane_3 Plane_3;
typedef typename boost::graph_traits<Polyhedron::face_descriptor face_descriptor;
typedef typename boost::graph_traits<Polyhedron>::face_descriptor face_descriptor;
typename Traits::Has_on_positive_side_3 has_on_positive_side =
traits.has_on_positive_side_3_object();
for (ForwardIterator p_it = first; p_it != last; p_it++)
{
Facet_iterator f_it;
BOOST_FOREACH(face_descriptor fd, faces(P))
{
Plane_3 plane;
get_plane2(P,plane, f_it);
get_plane2(P,plane, fd);
if (has_on_positive_side(plane,*p_it)){
return false;
}

View File

@ -58,7 +58,7 @@ void star_to_face_graph(const Triangulation_3& t,
if(no_infinite_faces && t.is_infinite(vhj)){
infinite_face = true;
} else {
std::pair<Vertex_map::iterator,bool> res
std::pair<typename Vertex_map::iterator,bool> res
= vertex_map.insert(std::make_pair(vhj,nullvertex));
if(res.second){
res.first->second = add_vertex(vhj->point(), fg);