From 7175cd8c6d8faae99735971e6c1eb9e3d9f82959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Mon, 7 Nov 2016 15:10:23 +0100 Subject: [PATCH] Several warnings --- .../Tools/Subdivider/Uniform/Composite/CompositeT.cc | 2 +- src/Unittests/unittests_tutorials.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.cc b/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.cc index 167c9895..72d7bcbe 100644 --- a/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.cc +++ b/src/OpenMesh/Tools/Subdivider/Uniform/Composite/CompositeT.cc @@ -589,7 +589,7 @@ void CompositeT::FVc(Coeff& _coeff) if (mesh_.face_handle(mesh_.opposite_halfedge_handle(mesh_.next_halfedge_handle(*voh_it))).is_valid()) { cog += mesh_.data(mesh_.face_handle(*voh_it)).position() * c; - cog += mesh_.data(mesh_.face_handle(mesh_.opposite_halfedge_handle(mesh_.next_halfedge_handle(*voh_it)))).position() * (1.0 - c); + cog += mesh_.data(mesh_.face_handle(mesh_.opposite_halfedge_handle(mesh_.next_halfedge_handle(*voh_it)))).position() * (static_cast(1.0) - c); } else { cog += mesh_.data(mesh_.face_handle(*voh_it)).position(); } diff --git a/src/Unittests/unittests_tutorials.cc b/src/Unittests/unittests_tutorials.cc index b2daf890..552fa614 100644 --- a/src/Unittests/unittests_tutorials.cc +++ b/src/Unittests/unittests_tutorials.cc @@ -57,7 +57,7 @@ struct MyData bool operator != (const MyData& _rhs) const { return !(*this == _rhs); } }; -typedef std::map< std::string, size_t > MyMap; +typedef std::map< std::string, unsigned int > MyMap; namespace OpenMesh { namespace IO { @@ -114,7 +114,7 @@ namespace OpenMesh { return sizeof(unsigned int); value_type::const_iterator it = _v.begin(); - size_t N = _v.size(); + unsigned int N = _v.size(); size_t bytes = IO::size_of(N); for(;it!=_v.end(); ++it) { @@ -128,7 +128,7 @@ namespace OpenMesh { size_t store(std::ostream& _os, const value_type& _v, bool _swap=false) { size_t bytes = 0; - size_t N = _v.size(); + unsigned int N = _v.size(); value_type::const_iterator it = _v.begin(); bytes += IO::store( _os, N, _swap ); for (; it != _v.end() && _os.good(); ++it) -- 2.22.0