From 9b06cc3fac7c8cbcd53031143ae4d97a38cd5eaf Mon Sep 17 00:00:00 2001 From: Simon Giraudot Date: Mon, 18 Jun 2018 14:40:59 +0200 Subject: [PATCH] Fix convertion warnings and update iterator type --- .../include/CGAL/Classification/Planimetric_grid.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Classification/include/CGAL/Classification/Planimetric_grid.h b/Classification/include/CGAL/Classification/Planimetric_grid.h index da11e209ab9..8339864ba53 100644 --- a/Classification/include/CGAL/Classification/Planimetric_grid.h +++ b/Classification/include/CGAL/Classification/Planimetric_grid.h @@ -84,7 +84,10 @@ public: typedef unspecified_type iterator; ///< A forward iterator with value type `std::size_t`. #else class iterator - : public boost::iterator_facade + : public boost::iterator_facade // Return value instead of reference { public: friend class boost::iterator_core_access; @@ -168,9 +171,9 @@ public: m_idx == other.m_idx); } - boost::uint32_t& dereference() const + std::size_t dereference() const { - return const_cast(m_lowest_scale->m_grid(m_pos_x, m_pos_y)[m_idx]); + return static_cast(m_lowest_scale->m_grid(m_pos_x, m_pos_y)[m_idx]); } private: @@ -222,7 +225,7 @@ public: const Point_3& p = get(point_map, *(input.begin()+i)); std::size_t x = (boost::uint32_t)((p.x() - bbox.xmin()) / grid_resolution); std::size_t y = (boost::uint32_t)((p.y() - bbox.ymin()) / grid_resolution); - m_grid(x,y).push_back (i); + m_grid(x,y).push_back (boost::uint32_t(i)); } }