Skip to content

Commit

Permalink
Change root accessor to return a reference
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Jun 17, 2020
1 parent 1835856 commit 54433ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Octree/include/CGAL/Octree.h
Expand Up @@ -146,9 +146,9 @@ namespace CGAL {
m_unit_per_depth.push_back(1 << (m_max_depth_reached - i));
}

Node *root() { return &m_root; }
Node &root() { return m_root; }

const Node *root() const { return &m_root; }
const Node &root() const { return m_root; }

bool operator==(Octree<Kernel, PointRange, PointMap> &rhs) {

Expand Down
2 changes: 1 addition & 1 deletion Octree/test/Octree/octree_test.cpp
Expand Up @@ -41,7 +41,7 @@ int main(void) {
Octree octree(points, point_map);
octree.refine(10, 1);

std::cout << (*octree.root());
std::cout << octree.root();

return 0;
}

0 comments on commit 54433ad

Please sign in to comment.