diff --git a/src/OpenMesh/Core/IO/SR_binary_vector_of_fundamentals.inl b/src/OpenMesh/Core/IO/SR_binary_vector_of_fundamentals.inl index 000f9f6b..15ebae26 100644 --- a/src/OpenMesh/Core/IO/SR_binary_vector_of_fundamentals.inl +++ b/src/OpenMesh/Core/IO/SR_binary_vector_of_fundamentals.inl @@ -30,7 +30,7 @@ template <> struct binary< std::vector< T > > { \ size_t bytes=0; \ \ if ( _swap) \ - bytes = std::accumulate( _v.begin(), _v.end(), 0, \ + bytes = std::accumulate( _v.begin(), _v.end(), size_t(0), \ FunctorRestore(_is, _swap) ); \ else \ { \ diff --git a/src/OpenMesh/Core/IO/SR_binary_vector_of_string.inl b/src/OpenMesh/Core/IO/SR_binary_vector_of_string.inl index acf5a1db..c6201ded 100644 --- a/src/OpenMesh/Core/IO/SR_binary_vector_of_string.inl +++ b/src/OpenMesh/Core/IO/SR_binary_vector_of_string.inl @@ -21,19 +21,19 @@ template <> struct binary< std::vector< std::string > > static size_t size_of(void) { return UnknownSize; } static size_t size_of(const value_type& _v) - { return std::accumulate( _v.begin(), _v.end(), 0u, Sum() ); } + { return std::accumulate( _v.begin(), _v.end(), size_t(0), Sum() ); } static size_t store(std::ostream& _os, const value_type& _v, bool _swap=false) { - return std::accumulate( _v.begin(), _v.end(), 0, + return std::accumulate( _v.begin(), _v.end(), size_t(0), FunctorStore(_os, _swap) ); } static size_t restore(std::istream& _is, value_type& _v, bool _swap=false) { - return std::accumulate( _v.begin(), _v.end(), 0, + return std::accumulate( _v.begin(), _v.end(), size_t(0), FunctorRestore(_is, _swap) ); } }; diff --git a/src/OpenMesh/Core/Utils/Property.hh b/src/OpenMesh/Core/Utils/Property.hh index 92b4015f..018f1e9c 100644 --- a/src/OpenMesh/Core/Utils/Property.hh +++ b/src/OpenMesh/Core/Utils/Property.hh @@ -135,7 +135,7 @@ public: { if (element_size() != IO::UnknownSize) return this->BaseProperty::size_of(n_elements()); - return std::accumulate(data_.begin(), data_.end(), 0, plus()); + return std::accumulate(data_.begin(), data_.end(), size_t(0), plus()); } virtual size_t size_of(size_t _n_elem) const