summaryrefslogtreecommitdiff
path: root/src/python/include/Simplex_tree_interface.h
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-08-24 09:17:23 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-08-24 09:17:23 +0200
commitd9ae2cb822631d68e4ef1cec7eed0124080c0020 (patch)
tree30d05c5d8dbe89a9b72d62a122751a26788ab72a /src/python/include/Simplex_tree_interface.h
parent1390b4c5e1207f41b66c69edc66496a5f9b63b12 (diff)
code review: call boundary_simplex_range only once
Diffstat (limited to 'src/python/include/Simplex_tree_interface.h')
-rw-r--r--src/python/include/Simplex_tree_interface.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/python/include/Simplex_tree_interface.h b/src/python/include/Simplex_tree_interface.h
index ab3f13f1..baff3850 100644
--- a/src/python/include/Simplex_tree_interface.h
+++ b/src/python/include/Simplex_tree_interface.h
@@ -226,7 +226,8 @@ class Simplex_tree_interface : public Simplex_tree<SimplexTreeOptions> {
if (bd_sh == Base::null_simplex())
throw std::runtime_error("simplex not found - cannot find boundaries");
// this specific case works because the range is just a pair of iterators - won't work if range was a vector
- return std::make_pair(Base::boundary_simplex_range(bd_sh).begin(), Base::boundary_simplex_range(bd_sh).end());
+ auto boundary_srange = Base::boundary_simplex_range(bd_sh);
+ return std::make_pair(boundary_srange.begin(), boundary_srange.end());
}
};