diff --git a/Orthtree/include/CGAL/Orthtree.h b/Orthtree/include/CGAL/Orthtree.h index 18edcf74a7f..284c51aa0f4 100644 --- a/Orthtree/include/CGAL/Orthtree.h +++ b/Orthtree/include/CGAL/Orthtree.h @@ -220,25 +220,27 @@ public: // copy constructor Orthtree(const Orthtree& other) : m_traits(other.m_traits), - m_bbox_min(other.m_bbox_min), m_side_per_depth(other.m_side_per_depth), + m_node_properties(other.m_node_properties), m_node_contents(m_node_properties.get_property("contents")), m_node_depths(m_node_properties.get_property("depths")), m_node_coordinates(m_node_properties.get_property("coordinates")), m_node_parents(m_node_properties.get_property("parents")), - m_node_children(m_node_properties.get_property("children")) {} + m_node_children(m_node_properties.get_property("children")), + m_bbox_min(other.m_bbox_min), m_side_per_depth(other.m_side_per_depth) + {} // move constructor Orthtree(Orthtree&& other) : m_traits(other.m_traits), - m_bbox_min(other.m_bbox_min), m_side_per_depth(other.m_side_per_depth), m_node_properties(std::move(other.m_node_properties)), m_node_contents(m_node_properties.get_property("contents")), m_node_depths(m_node_properties.get_property("depths")), m_node_coordinates(m_node_properties.get_property("coordinates")), m_node_parents(m_node_properties.get_property("parents")), - m_node_children(m_node_properties.get_property("children")) { - + m_node_children(m_node_properties.get_property("children")), + m_bbox_min(other.m_bbox_min), m_side_per_depth(other.m_side_per_depth) + { // todo: makes sure moved-from is still valid. Maybe this shouldn't be necessary. other.m_node_properties.emplace(); } @@ -1131,7 +1133,7 @@ public: // Iterate over all nodes for (auto n: orthtree.traverse(Orthtrees::Preorder_traversal(orthtree))) { // Show the depth - for (int i = 0; i < orthtree.depth(n); ++i) + for (std::size_t i = 0; i < orthtree.depth(n); ++i) os << ". "; // Print the node internal::print_orthtree_node(os, n, orthtree);