From bc4eca82b339cf08663ee84e029ccbf5c9e34b44 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 13 Jun 2018 10:47:44 +0200 Subject: [PATCH] Need double cast --- Polyhedron/include/CGAL/draw_polyhedron.h | 2 +- Triangulation_2/include/CGAL/draw_triangulation_2.h | 2 +- Triangulation_3/include/CGAL/draw_triangulation_3.h | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Polyhedron/include/CGAL/draw_polyhedron.h b/Polyhedron/include/CGAL/draw_polyhedron.h index d5874175ca4..b8464757097 100644 --- a/Polyhedron/include/CGAL/draw_polyhedron.h +++ b/Polyhedron/include/CGAL/draw_polyhedron.h @@ -41,7 +41,7 @@ struct DefaultColorFunctorPolyhedron if (fh==boost::graph_traits::null_face()) // use to get the mono color return CGAL::Color(100, 125, 200); // R G B between 0-255 - CGAL::Random random((unsigned int)&(*fh)); + CGAL::Random random((unsigned int)(std::size_t)(&(*fh))); return get_random_color(random); } }; diff --git a/Triangulation_2/include/CGAL/draw_triangulation_2.h b/Triangulation_2/include/CGAL/draw_triangulation_2.h index 1fec2863426..a1cfc460fdb 100644 --- a/Triangulation_2/include/CGAL/draw_triangulation_2.h +++ b/Triangulation_2/include/CGAL/draw_triangulation_2.h @@ -38,7 +38,7 @@ struct DefaultColorFunctorT2 static CGAL::Color run(const T2&, const typename T2::Finite_faces_iterator fh) { - CGAL::Random random((unsigned int)(&*fh)); + CGAL::Random random((unsigned int)(std::size_t)(&*fh)); return get_random_color(random); } }; diff --git a/Triangulation_3/include/CGAL/draw_triangulation_3.h b/Triangulation_3/include/CGAL/draw_triangulation_3.h index ed04dc3dedc..709bd15924f 100644 --- a/Triangulation_3/include/CGAL/draw_triangulation_3.h +++ b/Triangulation_3/include/CGAL/draw_triangulation_3.h @@ -41,7 +41,8 @@ struct DefaultColorFunctorT3 if (fh==NULL) // use to get the mono color return CGAL::Color(100, 125, 200); // R G B between 0-255 - CGAL::Random random((unsigned int)(&*((*fh)->first))+(unsigned int)((*fh)->second)); + CGAL::Random random((unsigned int)((std::size_t)(&*((*fh)->first))+ + (std::size_t)((*fh)->second))); return get_random_color(random); } };