Skip to content

Commit

Permalink
Use const accessor everywhere root is used
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Jul 29, 2020
1 parent 19e36a0 commit e99bf47
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -741,7 +741,7 @@ class Efficient_RANSAC {
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) &&
Expand Down Expand Up @@ -1022,11 +1022,11 @@ class Efficient_RANSAC {

typedef typename internal::Octree<PointAccessor>::Cell Cell;

std::stack<Cell *> stack;
stack.push(octree->m_root);
std::stack<const Cell *> 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));
Expand Down Expand Up @@ -1074,7 +1074,7 @@ class Efficient_RANSAC {
typedef typename internal::Octree<PointAccessor>::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();
Expand Down

0 comments on commit e99bf47

Please sign in to comment.