Skip to content

Commit

Permalink
use destroy_paths() in clip
Browse files Browse the repository at this point in the history
  • Loading branch information
glennhickey committed Jul 22, 2024
1 parent 9429d62 commit 2f317a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/clip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ void delete_nodes_and_chop_paths(MutablePathMutableHandleGraph* graph, const uno
vector<path_handle_t> path_handles;
graph->for_each_path_handle([&](path_handle_t path_handle) {
path_handles.push_back(path_handle);
});
});
vector<path_handle_t> paths_to_destroy;
for (path_handle_t& path_handle : path_handles) {

string path_name = graph->get_path_name(path_handle);
Expand Down Expand Up @@ -257,10 +258,13 @@ void delete_nodes_and_chop_paths(MutablePathMutableHandleGraph* graph, const uno
}

if (was_chopped) {
graph->destroy_path(path_handle);
paths_to_destroy.push_back(path_handle);
}
}

// delete the paths
graph->destroy_paths(paths_to_destroy);

DeletableHandleGraph* del_graph = dynamic_cast<DeletableHandleGraph*>(graph);
// delete the edges
for (edge_t edge : edges_to_delete) {
Expand Down

1 comment on commit 2f317a0

@adamnovak
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vg CI tests complete for branch deconstruct. View the full report here.

16 tests passed, 0 tests failed and 0 tests skipped in 17331 seconds

Please sign in to comment.