Get rid of some size_t warnings in OpenMesh
git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@839 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
@@ -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<elem_type>(_is, _swap) ); \
|
||||
else \
|
||||
{ \
|
||||
|
||||
@@ -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<elem_type>(_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<elem_type>(_is, _swap) );
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user