From a07a50640eaa4006cd532c1ec166a527b9ee8920 Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 16 Dec 2016 16:35:31 +0000 Subject: Fix cppcheck warnings git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@1906 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: abb0875f5cfe3b3d0ce738257efc3f4c0fb57adc --- src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h | 2 +- src/Subsampling/example/example_custom_kernel.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h index 681de8c6..bc8099e6 100644 --- a/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h +++ b/src/Persistent_cohomology/include/gudhi/Persistent_cohomology.h @@ -110,7 +110,7 @@ class Persistent_cohomology { cell_pool_() { if (cpx_->num_simplices() > std::numeric_limits::max()) { // num_simplices must be strictly lower than the limit, because a value is reserved for null_key. - throw std::out_of_range ("The number of simplices is more than Simplex_key type numeric limit."); + throw std::out_of_range("The number of simplices is more than Simplex_key type numeric limit."); } Simplex_key idx_fil = 0; for (auto sh : cpx_->filtration_simplex_range()) { diff --git a/src/Subsampling/example/example_custom_kernel.cpp b/src/Subsampling/example/example_custom_kernel.cpp index f87ef0b3..25b5bf6c 100644 --- a/src/Subsampling/example/example_custom_kernel.cpp +++ b/src/Subsampling/example/example_custom_kernel.cpp @@ -26,10 +26,10 @@ class Kernel { public: Squared_distance_d() { - matrix_.push_back(std::vector({0,1,2,4})); - matrix_.push_back(std::vector({1,0,4,2})); - matrix_.push_back(std::vector({2,4,0,1})); - matrix_.push_back(std::vector({4,2,1,0})); + matrix_.push_back(std::vector({0, 1, 2, 4})); + matrix_.push_back(std::vector({1, 0, 4, 2})); + matrix_.push_back(std::vector({2, 4, 0, 1})); + matrix_.push_back(std::vector({4, 2, 1, 0})); } FT operator()(Point_d p1, Point_d p2) { -- cgit v1.2.3 From a0685fdfba0e6fb210468726ca45ce5dff8672ff Mon Sep 17 00:00:00 2001 From: vrouvrea Date: Fri, 16 Dec 2016 16:36:31 +0000 Subject: Fix cppcheck warnings git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/trunk@1907 636b058d-ea47-450e-bf9e-a15bfbe3eedb Former-commit-id: fa45fd8721733a07c8d218930e545ee590788de5 --- src/Alpha_complex/include/gudhi/Alpha_complex.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Alpha_complex/include/gudhi/Alpha_complex.h b/src/Alpha_complex/include/gudhi/Alpha_complex.h index 9d5a9bad..1ff95c3d 100644 --- a/src/Alpha_complex/include/gudhi/Alpha_complex.h +++ b/src/Alpha_complex/include/gudhi/Alpha_complex.h @@ -193,17 +193,17 @@ class Alpha_complex { triangulation_ = new Delaunay_triangulation(point_dimension(*first)); std::vector point_cloud(first, last); - + // Creates a vector {0, 1, ..., N-1} std::vector indices(boost::counting_iterator(0), boost::counting_iterator(point_cloud.size())); - + typedef boost::iterator_property_map::iterator, CGAL::Identity_property_map> Point_property_map; typedef CGAL::Spatial_sort_traits_adapter_d Search_traits_d; - + CGAL::spatial_sort(indices.begin(), indices.end(), Search_traits_d(std::begin(point_cloud))); - + typename Delaunay_triangulation::Full_cell_handle hint; for (auto index : indices) { typename Delaunay_triangulation::Vertex_handle pos = triangulation_->insert(point_cloud[index], hint); -- cgit v1.2.3