From 9ce621289b5061e30329426aef5695ae3e19a099 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 21 Jan 2016 20:46:10 +0000 Subject: cpplint/cppcheck fixes git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/VR_witness@985 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 4dc15b3ab0eecb8d4f5bbb1ac1cb9dabf95233e4 --- src/Witness_complex/include/gudhi/Witness_complex.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/Witness_complex/include/gudhi/Witness_complex.h') diff --git a/src/Witness_complex/include/gudhi/Witness_complex.h b/src/Witness_complex/include/gudhi/Witness_complex.h index 27f7a9c0..34cbc882 100644 --- a/src/Witness_complex/include/gudhi/Witness_complex.h +++ b/src/Witness_complex/include/gudhi/Witness_complex.h @@ -82,7 +82,6 @@ class Witness_complex { private: int nbL; // Number of landmarks - double density; // Desired density Simplicial_complex& sc; // Simplicial complex public: @@ -116,8 +115,6 @@ class Witness_complex { // Construction of the active witness list int nbW = knn.size(); typeVectorVertex vv; - typeSimplex simplex; - typePairSimplexBool returnValue; int counter = 0; /* The list of still useful witnesses * it will diminuish in the course of iterations @@ -128,7 +125,7 @@ class Witness_complex { // by doing it we don't assume that landmarks are necessarily witnesses themselves anymore counter++; vv = {i}; - returnValue = sc.insert_simplex(vv); + sc.insert_simplex(vv); // TODO(SK) Error if not inserted : normally no need here though } int k = 1; /* current dimension in iterative construction */ @@ -145,7 +142,8 @@ class Witness_complex { if (ok) { for (int i = 0; i != k + 1; ++i) simplex_vector.push_back(knn[*it][i]); - returnValue = sc.insert_simplex(simplex_vector, 0.0); + sc.insert_simplex(simplex_vector, 0.0); + // TODO(SK) Error if not inserted : normally no need here though it++; } else { active_w.erase(it++); // First increase the iterator and then erase the previous element @@ -183,7 +181,7 @@ class Witness_complex { } template - void print_vector(const std::vector v) { + static void print_vector(const std::vector& v) { std::cout << "["; if (!v.empty()) { std::cout << *(v.begin()); -- cgit v1.2.3