From f904023210531c72c2762a07c59d68c5b2a0d048 Mon Sep 17 00:00:00 2001 From: glisse Date: Wed, 15 Jul 2015 16:36:52 +0000 Subject: Use C++11 range for. git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@720 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: fd3824262b699310e424db4a4bdc4d9a6a1ba477 --- src/Simplex_tree/include/gudhi/Simplex_tree.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (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 107c0f63..a7244c3d 100644 --- a/src/Simplex_tree/include/gudhi/Simplex_tree.h +++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h @@ -606,10 +606,8 @@ class Simplex_tree { void initialize_filtration() { filtration_vect_.clear(); filtration_vect_.reserve(num_simplices()); - for (auto cpx_it = complex_simplex_range().begin(); - cpx_it != complex_simplex_range().end(); ++cpx_it) { - filtration_vect_.push_back(*cpx_it); - } + for (Simplex_handle sh : complex_simplex_range()) + filtration_vect_.push_back(sh); // the stable sort ensures the ordering heuristic std::stable_sort(filtration_vect_.begin(), filtration_vect_.end(), -- cgit v1.2.3