summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-04-01 08:50:48 +0000
committervrouvrea <vrouvrea@636b058d-ea47-450e-bf9e-a15bfbe3eedb>2016-04-01 08:50:48 +0000
commitfde42a187d4a1a7abb4eaa3239cd884f8731b08a (patch)
tree2a1dcbc72116234482fae5c652ab290ffc28e9b9 /src
parenteefb9628f71cd74127cfc9ffa4f8db0803d82ad9 (diff)
cpplint/cppcheck fixes
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/alphashapes@1091 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 1c274cd8c8a3c76fe35f96c7186bcbf3d8bee3e8
Diffstat (limited to 'src')
-rw-r--r--src/Simplex_tree/include/gudhi/Simplex_tree.h14
-rw-r--r--src/common/include/gudhi/reader_utils.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/src/Simplex_tree/include/gudhi/Simplex_tree.h b/src/Simplex_tree/include/gudhi/Simplex_tree.h
index f5bc0a11..afc7d613 100644
--- a/src/Simplex_tree/include/gudhi/Simplex_tree.h
+++ b/src/Simplex_tree/include/gudhi/Simplex_tree.h
@@ -955,7 +955,7 @@ class Simplex_tree {
bool operator()(const Simplex_handle sh1, const Simplex_handle sh2) const {
// Not using st_->filtration(sh1) because it uselessly tests for null_simplex.
if (sh1->second.filtration() != sh2->second.filtration()) {
- return sh1->second.filtration() < sh2->second.filtration();
+ return sh1->second.filtration() < sh2->second.filtration();
}
// is sh1 a proper subface of sh2
return st_->reverse_lexicographic_order(sh1, sh2);
@@ -1194,16 +1194,16 @@ class Simplex_tree {
bool prune_above_filtration(Filtration_value filt) {
return rec_prune_above_filtration(root(), filt);
}
-
+
private:
bool rec_prune_above_filtration(Siblings* sib, Filtration_value filt) {
- auto&& list=sib->members();
+ auto&& list = sib->members();
auto last = std::remove_if(list.begin(), list.end(), [=](Dit_value_t& simplex) {
- if (simplex.second.filtration()<=filt) return false;
+ if (simplex.second.filtration() <= filt) return false;
if (has_children(&simplex)) rec_delete(simplex.second.children());
return true;
});
-
+
bool modified = (last != list.end());
if (last == list.begin() && sib != root()) {
// Removing the whole siblings, parent becomes a leaf.
@@ -1213,8 +1213,8 @@ class Simplex_tree {
} else {
// Keeping some elements of siblings. Remove the others, and recurse in the remaining ones.
list.erase(last, list.end());
- for(auto&& simplex : list)
- if(has_children(&simplex))
+ for (auto&& simplex : list)
+ if (has_children(&simplex))
modified |= rec_prune_above_filtration(simplex.second.children(), filt);
}
return modified;
diff --git a/src/common/include/gudhi/reader_utils.h b/src/common/include/gudhi/reader_utils.h
index da2c2c36..899f9df6 100644
--- a/src/common/include/gudhi/reader_utils.h
+++ b/src/common/include/gudhi/reader_utils.h
@@ -161,7 +161,7 @@ bool read_simplex(std::istream & in_, std::vector< Vertex_handle > & simplex, Fi
simplex.push_back(v);
}
in_ >> fil;
- in_.ignore((std::numeric_limits<std::streamsize>::max)(), '\n'); // ignore until the carriage return
+ in_.ignore((std::numeric_limits<std::streamsize>::max)(), '\n'); // ignore until the carriage return
return true;
}