Commit 00090fc2 authored by Jan Möbius's avatar Jan Möbius

Merge branch 'warn' into 'master'

Warn

See merge request !99
parents f377c86a 7a1cad00
Pipeline #3411 passed with stage
in 41 minutes and 7 seconds
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <sstream> #include <sstream>
#include <limits>
#if defined(OM_CC_MIPS) #if defined(OM_CC_MIPS)
# include <math.h> # include <math.h>
#else #else
...@@ -151,7 +152,7 @@ void usage_and_exit(const std::string& _fname, int xcode); ...@@ -151,7 +152,7 @@ void usage_and_exit(const std::string& _fname, int xcode);
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
size_t n_iter = 0; // n iteration 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::numeric_limits<size_t>::max(); // max. number of vertices in the end
std::string ifname; // input mesh std::string ifname; // input mesh
std::string ofname; // output mesh std::string ofname; // output mesh
std::string rule_sequence = "Tvv3 VF FF FVc"; // sqrt3 default std::string rule_sequence = "Tvv3 VF FF FVc"; // sqrt3 default
...@@ -207,11 +208,11 @@ int main(int argc, char **argv) ...@@ -207,11 +208,11 @@ int main(int argc, char **argv)
if ( n_iter > 0 ) if ( n_iter > 0 )
std::cout << "Desired #iterations: " << n_iter << std::endl; std::cout << "Desired #iterations: " << n_iter << std::endl;
if ( max_nv < size_t(-1) ) if ( max_nv < std::numeric_limits<size_t>::max() )
{ {
std::cout << "Desired max. #V : " << max_nv << std::endl; std::cout << "Desired max. #V : " << max_nv << std::endl;
if (!n_iter ) if (!n_iter )
n_iter = size_t(-1); n_iter = std::numeric_limits<size_t>::max();
} }
......
...@@ -181,7 +181,7 @@ compute_new_positions_C1() ...@@ -181,7 +181,7 @@ compute_new_positions_C1()
if (diag) uu *= static_cast<typename Mesh::Scalar>(1.0) / diag; if (diag) uu *= static_cast<typename Mesh::Scalar>(1.0) / diag;
// damping // damping
uu *= 0.25; uu *= static_cast<typename Mesh::Normal::value_type>(0.25);
// store new position // store new position
p = vector_cast<typename Mesh::Normal>(Base::mesh_.point(*v_it)); p = vector_cast<typename Mesh::Normal>(Base::mesh_.point(*v_it));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment