From de0bdf55c16de11d47809dc6f347773b10cc3673 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 16 Dec 2016 16:11:45 +0000 Subject: Warning fixes git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@1905 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 7b7222ebe65fd01fde30f8ba527ebaee633fc87e --- src/GudhUI/utils/Vertex_collapsor.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/GudhUI/utils/Vertex_collapsor.h') diff --git a/src/GudhUI/utils/Vertex_collapsor.h b/src/GudhUI/utils/Vertex_collapsor.h index 2b36cb3a..3f0e7ffd 100644 --- a/src/GudhUI/utils/Vertex_collapsor.h +++ b/src/GudhUI/utils/Vertex_collapsor.h @@ -80,7 +80,6 @@ template class Vertex_collapsor { if (link.empty()) return false; if (link.is_cone()) return true; if (link.num_connected_components() > 1) return false; - Edge_contractor contractor(link, link.num_vertices() - 1); return (link.num_vertices() == 1); } }; -- cgit v1.2.3 From e4488910a08479f5b9becd7e95e584b0df2dc7cf Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Thu, 23 Mar 2017 14:03:37 +0000 Subject: Rollback modif git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/bad_warning_removal_rollback@2227 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: 5bd3fda973c28dfb5567abbd9cf23d9d4dc653b5 --- src/Contraction/example/Garland_heckbert.cpp | 12 +++++++++--- src/GudhUI/utils/Critical_points.h | 3 +++ src/GudhUI/utils/Is_manifold.h | 2 ++ src/GudhUI/utils/Vertex_collapsor.h | 2 ++ 4 files changed, 16 insertions(+), 3 deletions(-) (limited to 'src/GudhUI/utils/Vertex_collapsor.h') diff --git a/src/Contraction/example/Garland_heckbert.cpp b/src/Contraction/example/Garland_heckbert.cpp index 4689519f..9f449b0d 100644 --- a/src/Contraction/example/Garland_heckbert.cpp +++ b/src/Contraction/example/Garland_heckbert.cpp @@ -63,10 +63,12 @@ typedef Skeleton_blocker_contractor Complex_contractor; * the point minimizing the cost of the quadric. */ class GH_placement : public Gudhi::contraction::Placement_policy { + Complex& complex_; + public: typedef Gudhi::contraction::Placement_policy::Placement_type Placement_type; - GH_placement(Complex& complex) { } + GH_placement(Complex& complex) : complex_(complex) { (void)complex_; } Placement_type operator()(const EdgeProfile& profile) const override { auto sum_quad(profile.v0().quadric); @@ -85,10 +87,12 @@ class GH_placement : public Gudhi::contraction::Placement_policy { * which expresses a squared distances with triangles planes. */ class GH_cost : public Gudhi::contraction::Cost_policy { + Complex& complex_; + public: typedef Gudhi::contraction::Cost_policy::Cost_type Cost_type; - GH_cost(Complex& complex) { } + GH_cost(Complex& complex) : complex_(complex) { (void)complex_; } Cost_type operator()(EdgeProfile const& profile, boost::optional const& new_point) const override { Cost_type res; @@ -107,8 +111,10 @@ class GH_cost : public Gudhi::contraction::Cost_policy { * and we update them when contracting an edge (the quadric become the sum of both quadrics). */ class GH_visitor : public Gudhi::contraction::Contraction_visitor { + Complex& complex_; + public: - GH_visitor(Complex& complex) { } + GH_visitor(Complex& complex) : complex_(complex) { (void)complex_; } // Compute quadrics for every vertex v // The quadric of v consists in the sum of quadric diff --git a/src/GudhUI/utils/Critical_points.h b/src/GudhUI/utils/Critical_points.h index b88293e9..2a18e079 100644 --- a/src/GudhUI/utils/Critical_points.h +++ b/src/GudhUI/utils/Critical_points.h @@ -105,6 +105,9 @@ template class Critical_points { if (link.empty()) return 0; + Edge_contractor contractor(link, link.num_vertices() - 1); + (void)contractor; + if (link.num_connected_components() > 1) // one than more CC -> not contractible return 0; diff --git a/src/GudhUI/utils/Is_manifold.h b/src/GudhUI/utils/Is_manifold.h index 6dd7898e..d0974463 100644 --- a/src/GudhUI/utils/Is_manifold.h +++ b/src/GudhUI/utils/Is_manifold.h @@ -76,6 +76,8 @@ template class Is_manifold { bool is_k_sphere(Vertex_handle v, int k) { auto link = input_complex_.link(v); + Edge_contractor contractor(link, link.num_vertices() - 1); + (void)contractor; return (is_sphere_simplex(link) == k); } diff --git a/src/GudhUI/utils/Vertex_collapsor.h b/src/GudhUI/utils/Vertex_collapsor.h index 3f0e7ffd..568dab2f 100644 --- a/src/GudhUI/utils/Vertex_collapsor.h +++ b/src/GudhUI/utils/Vertex_collapsor.h @@ -80,6 +80,8 @@ template class Vertex_collapsor { if (link.empty()) return false; if (link.is_cone()) return true; if (link.num_connected_components() > 1) return false; + Edge_contractor contractor(link, link.num_vertices() - 1); + (void)contractor; return (link.num_vertices() == 1); } }; -- cgit v1.2.3