From d767759862fccee8f33cba4696f5d0a91be3d153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Thu, 27 Oct 2016 14:43:29 +0200 Subject: [PATCH 1/3] Warning in subdivider fixed --- src/OpenMesh/Tools/Smoother/JacobiLaplaceSmootherT.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenMesh/Tools/Smoother/JacobiLaplaceSmootherT.cc b/src/OpenMesh/Tools/Smoother/JacobiLaplaceSmootherT.cc index c88ac13d..62fa98c1 100644 --- a/src/OpenMesh/Tools/Smoother/JacobiLaplaceSmootherT.cc +++ b/src/OpenMesh/Tools/Smoother/JacobiLaplaceSmootherT.cc @@ -181,7 +181,7 @@ compute_new_positions_C1() if (diag) uu *= static_cast(1.0) / diag; // damping - uu *= 0.25; + uu *= static_cast(0.25); // store new position p = vector_cast(Base::mesh_.point(*v_it)); -- GitLab From b05912ae0443676c3058d40b51931b87b6d8ca93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Thu, 27 Oct 2016 14:46:57 +0200 Subject: [PATCH 2/3] Fixed ugly init --- src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc b/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc index d29227dc..cdb25cc1 100644 --- a/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc +++ b/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc @@ -60,6 +60,7 @@ #include #include #include +#include #if defined(OM_CC_MIPS) # include #else @@ -151,7 +152,7 @@ void usage_and_exit(const std::string& _fname, int xcode); int main(int argc, char **argv) { size_t n_iter = 0; // n iteration - size_t max_nv = size_t(-1); // max. number of vertices in the end + size_t max_nv = std::limits::max(); // max. number of vertices in the end std::string ifname; // input mesh std::string ofname; // output mesh std::string rule_sequence = "Tvv3 VF FF FVc"; // sqrt3 default @@ -207,11 +208,11 @@ int main(int argc, char **argv) if ( n_iter > 0 ) std::cout << "Desired #iterations: " << n_iter << std::endl; - if ( max_nv < size_t(-1) ) + if ( max_nv < std::limits::max() ) { std::cout << "Desired max. #V : " << max_nv << std::endl; if (!n_iter ) - n_iter = size_t(-1); + n_iter = std::limits::max(); } -- GitLab From 7a1cad003d076ec27a9ef9b63c854f13b18bc29f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Fri, 28 Oct 2016 08:08:09 +0200 Subject: [PATCH 3/3] Typo --- src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc b/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc index cdb25cc1..dd155af1 100644 --- a/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc +++ b/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc @@ -152,7 +152,7 @@ void usage_and_exit(const std::string& _fname, int xcode); int main(int argc, char **argv) { size_t n_iter = 0; // n iteration - size_t max_nv = std::limits::max(); // max. number of vertices in the end + size_t max_nv = std::numeric_limits::max(); // max. number of vertices in the end std::string ifname; // input mesh std::string ofname; // output mesh std::string rule_sequence = "Tvv3 VF FF FVc"; // sqrt3 default @@ -208,11 +208,11 @@ int main(int argc, char **argv) if ( n_iter > 0 ) std::cout << "Desired #iterations: " << n_iter << std::endl; - if ( max_nv < std::limits::max() ) + if ( max_nv < std::numeric_limits::max() ) { std::cout << "Desired max. #V : " << max_nv << std::endl; if (!n_iter ) - n_iter = std::limits::max(); + n_iter = std::numeric_limits::max(); } -- GitLab