diff --git a/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc b/src/OpenMesh/Apps/Subdivider/adaptive_subdivider.cc index d29227dc009742bd82e2ee1ab7294c9ae1094212..dd155af16e5cc8dc67eaf5c5e1eea05a7668280c 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::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 @@ -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::numeric_limits::max() ) { std::cout << "Desired max. #V : " << max_nv << std::endl; if (!n_iter ) - n_iter = size_t(-1); + n_iter = std::numeric_limits::max(); } diff --git a/src/OpenMesh/Tools/Smoother/JacobiLaplaceSmootherT.cc b/src/OpenMesh/Tools/Smoother/JacobiLaplaceSmootherT.cc index c88ac13d773ac9cdc7f4a1420ff204d598bebe30..62fa98c1e94e93e27748286a2ed9f973a6314e55 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));