summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-08-30 09:18:40 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2017-08-30 09:18:40 +0000
commit5fb66b3c664b2343776b97327c4bde9eb6c69351 (patch)
treec041370e90dda6ed57f2902423c84a08289e4c53
parent3e9006eeb1c731e63fce5aa71802997284abe461 (diff)
Code review better use a break to end loop when we know it is not needed to be inserted.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/graph_expansion_with_blocker_oracle@2640 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 2f5fe60856598f0b45c86fd91beda407bcf6938d
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h
index ee173c70..f7df277c 100644
--- a/src/Simplex_tree/include/gudhi/Simplex_tree.h
+++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h
@@ -1132,7 +1132,10 @@ class Simplex_tree {
// If all the boundaries are present, 'next' needs to be inserted
for (auto& border : boundary_simplex_range(simplex)) {
Simplex_handle border_child = find_child(border, next->first);
- to_be_inserted = to_be_inserted && (border_child != null_simplex());
+ if (border_child == null_simplex()) {
+ to_be_inserted=false;
+ break;
+ }
filt = std::max(filt, filtration(border_child));
}
if (to_be_inserted) {