From 32541f007475e322e13c81272bddbb6bbd3db8f5 Mon Sep 17 00:00:00 2001 From: Jackson Campolattaro Date: Wed, 29 Jul 2020 14:56:30 -0400 Subject: [PATCH] Use const accessor everywhere root is used --- .../Efficient_RANSAC/Efficient_RANSAC.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h b/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h index 1af9984d902..f0c54a55bb9 100644 --- a/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h +++ b/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h @@ -741,7 +741,7 @@ public: num_invalid++; for (std::size_t j = 0; j < m_num_subsets; j++) { - if (m_direct_octrees[j] && m_direct_octrees[j]->m_root) { + if (m_direct_octrees[j] && m_direct_octrees[j]->root()) { std::size_t offset = m_direct_octrees[j]->offset(); if (offset <= indices_points_best_candidate.at(i) && @@ -1022,11 +1022,11 @@ private: typedef typename internal::Octree::Cell Cell; - std::stack stack; - stack.push(octree->m_root); + std::stack stack; + stack.push(octree->root()); while (!stack.empty()) { - Cell *cell = stack.top(); + const Cell *cell = stack.top(); stack.pop(); FT width = octree->m_width / (1 << (cell->level)); @@ -1074,7 +1074,7 @@ private: typedef typename internal::Octree::Cell Cell; bool upperZ, upperY, upperX; - Cell *cur = octree->m_root; + const Cell *cur = octree->root(); while (cur && cur->level < level) { upperX = cur->center.x() <= p.x();