From ac23cb90bb8dba2b85c660e97eb62cd547995048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Thu, 25 Jun 2015 10:45:05 +0000 Subject: [PATCH] Fixed warnings git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1301 fdac6126-5c0c-442c-9429-916003d36597 --- src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc | 4 ++-- src/Unittests/unittests_smoother.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc index cd71e415..cfea2e98 100644 --- a/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc +++ b/src/OpenMesh/Tools/Subdivider/Adaptive/Composite/RulesT.cc @@ -1173,7 +1173,7 @@ void FVc::raise(typename M::VertexHandle& _vh, state_t _target_state) c = _2over3 * ( cos( _2pi / valence) + 1.0); #else valence = Base::mesh_.valence(_vh); - c = coeff(valence); + c = typename M::Scalar(coeff(valence)); #endif @@ -1193,7 +1193,7 @@ void FVc::raise(typename M::VertexHandle& _vh, state_t _target_state) position += MOBJ(Base::mesh_.FH(*voh_it)).position(_target_state - 1) * c; - position += MOBJ(Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(*voh_it)))).position(_target_state - 1) * (1.0 - c); + position += MOBJ(Base::mesh_.FH(Base::mesh_.OHEH(Base::mesh_.NHEH(*voh_it)))).position(_target_state - 1) * ( typename M::Scalar(1.0) - c); } else { diff --git a/src/Unittests/unittests_smoother.cc b/src/Unittests/unittests_smoother.cc index 46f5bb50..1f95ad40 100644 --- a/src/Unittests/unittests_smoother.cc +++ b/src/Unittests/unittests_smoother.cc @@ -71,10 +71,10 @@ TEST_F(OpenMeshSmoother_Triangle, Smoother_Poly_Laplace) { OpenMesh::Smoother::JacobiLaplaceSmootherT smoother(mesh_); // Just call function to instanciate template - smoother.set_absolute_local_error(0.5); + smoother.set_absolute_local_error(0.5f); // Set an error - smoother.set_relative_local_error(0.1); + smoother.set_relative_local_error(0.1f); // Run algorithm with 5 steps smoother.smooth(5);