From 23c6f4e26b60374d9df37445598c087ff6b52512 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Tue, 21 Aug 2018 12:05:28 +0000 Subject: Add DEBUG_TRACES for the test Add move constructor test git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/simplex_tree_fix_vincent@3818 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 4e9baaedcbcb6fdfc7b5ee0ac42bc75559b67bd1 --- src/Simplex_tree/include/gudhi/Simplex_tree.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Simplex_tree/include') diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h index ca3575ba..d604f994 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -301,7 +301,9 @@ class Simplex_tree { root_(nullptr, null_vertex_ , simplex_source.root_.members_), filtration_vect_(), dimension_(simplex_source.dimension_) { +#ifdef DEBUG_TRACES std::cout << "copy constructor" << std::endl; +#endif // DEBUG_TRACES auto root_source = simplex_source.root_; rec_copy(&root_, &root_source); } @@ -327,7 +329,9 @@ class Simplex_tree { root_(std::move(old.root_)), filtration_vect_(std::move(old.filtration_vect_)), dimension_(std::move(old.dimension_)) { +#ifdef DEBUG_TRACES std::cout << "move constructor" << std::endl; +#endif // DEBUG_TRACES old.dimension_ = -1; old.root_ = Siblings(nullptr, null_vertex_); } @@ -344,7 +348,9 @@ class Simplex_tree { /** \brief User-defined copy assignment reproduces the whole tree structure. */ Simplex_tree& operator= (const Simplex_tree& simplex_source) { +#ifdef DEBUG_TRACES std::cout << "copy assignment" << std::endl; +#endif // DEBUG_TRACES this->null_vertex_ = simplex_source.null_vertex_; root_ = Siblings(nullptr, null_vertex_ , simplex_source.root_.members_); this->filtration_vect_.clear(); -- cgit v1.2.3