diff --git a/src/OpenMesh/Core/IO/SR_binary_spec.hh b/src/OpenMesh/Core/IO/SR_binary_spec.hh index 690fdc0e..6777e8a6 100644 --- a/src/OpenMesh/Core/IO/SR_binary_spec.hh +++ b/src/OpenMesh/Core/IO/SR_binary_spec.hh @@ -337,7 +337,7 @@ struct binary< std::vector< T >, typename std::enable_if::size_of() != IO::UnknownSize) { - unsigned int N = _v.size(); + unsigned int N = static_cast(_v.size()); auto res = binary::size_of()*_v.size() + (_store_size? sizeof(decltype(N)) : 0); return res; } @@ -359,7 +359,7 @@ struct binary< std::vector< T >, typename std::enable_if(_v.size()); bytes += binary::store( _os, N, _swap ); } if (_swap) diff --git a/src/OpenMesh/Core/IO/SR_binary_vector_of_bool.inl b/src/OpenMesh/Core/IO/SR_binary_vector_of_bool.inl index 6a8c8ceb..2896bb47 100644 --- a/src/OpenMesh/Core/IO/SR_binary_vector_of_bool.inl +++ b/src/OpenMesh/Core/IO/SR_binary_vector_of_bool.inl @@ -25,7 +25,7 @@ template <> struct binary< std::vector > if(_store_size) { - unsigned int size_N = _v.size(); + unsigned int size_N = static_cast(_v.size()); bytes += binary::store( _ostr, size_N, _swap ); }