diff options
author | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-02-03 09:36:48 +0000 |
---|---|---|
committer | vrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-02-03 09:36:48 +0000 |
commit | 4bae7fba52dbb84bca82cdb247f7e26232ce598f (patch) | |
tree | 55eb3ecab4f8d5991187a0e38b99691915dded1d /src | |
parent | 9aa92aa2b504d9530125a6a164f76c11f45d8bb5 (diff) | |
parent | 98bb425ef8c401b2eb8d161393c389b5cf6070c8 (diff) |
Merge of AddressSanitizer bug fixes
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@996 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: 20e4b949af8e4481c13e8a91181fe772c696f01a
Diffstat (limited to 'src')
-rw-r--r-- | src/Simplex_tree/include/gudhi/Simplex_tree.h | 5 | ||||
-rw-r--r-- | src/Skeleton_blocker/test/TestSkeletonBlockerComplex.cpp | 6 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h index 708cdef9..096270ee 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -325,11 +325,10 @@ class Simplex_tree { Simplex_tree(const Simplex_tree& simplex_source) : null_vertex_(simplex_source.null_vertex_), threshold_(simplex_source.threshold_), + root_(nullptr, null_vertex_ , simplex_source.root_.members_), filtration_vect_(), dimension_(simplex_source.dimension_) { auto root_source = simplex_source.root_; - auto memb_source = root_source.members(); - root_ = Siblings(nullptr, null_vertex_, memb_source); rec_copy(&root_, &root_source); } @@ -341,7 +340,7 @@ class Simplex_tree { Siblings * newsib = new Siblings(sib, sh_source->first); newsib->members_.reserve(sh_source->second.children()->members().size()); for (auto & child : sh_source->second.children()->members()) - newsib->members_.emplace_hint(newsib->members_.end(), child.first, Node(sib, child.second.filtration())); + newsib->members_.emplace_hint(newsib->members_.end(), child.first, Node(newsib, child.second.filtration())); rec_copy(newsib, sh_source->second.children()); sh->second.assign_children(newsib); } diff --git a/src/Skeleton_blocker/test/TestSkeletonBlockerComplex.cpp b/src/Skeleton_blocker/test/TestSkeletonBlockerComplex.cpp index 42482e23..71b1833b 100644 --- a/src/Skeleton_blocker/test/TestSkeletonBlockerComplex.cpp +++ b/src/Skeleton_blocker/test/TestSkeletonBlockerComplex.cpp @@ -601,7 +601,7 @@ bool test_link4() { } bool test_link5() { - Complex complex(0, new Print_complex_visitor<Vertex_handle>()); + Complex complex(0); // Build the complexes build_complete(4, complex); complex.add_blocker(Simplex(Vertex_handle(0), Vertex_handle(1), Vertex_handle(2), Vertex_handle(3))); @@ -621,7 +621,7 @@ bool test_link5() { } bool test_link6() { - Complex complex(0, new Print_complex_visitor<Vertex_handle>()); + Complex complex(0); // Build the complexes build_complete(4, complex); complex.add_blocker(Simplex(Vertex_handle(0), Vertex_handle(1), Vertex_handle(2))); @@ -642,7 +642,7 @@ bool test_link6() { } bool test_link7() { - Complex complex(0, new Print_complex_visitor<Vertex_handle>()); + Complex complex(0); // Build the complexes build_complete(6, complex); complex.add_vertex(); |