Merge branch 'FixBinaryWarnings' into 'master'

fix warnings in binary

See merge request OpenMesh/OpenMesh!312
This commit is contained in:
Jan Möbius
2022-01-17 08:16:32 +00:00
2 changed files with 3 additions and 3 deletions

View File

@@ -337,7 +337,7 @@ struct binary< std::vector< T >, typename std::enable_if<std::is_default_constru
{
if(binary<T>::size_of() != IO::UnknownSize)
{
unsigned int N = _v.size();
unsigned int N = static_cast<unsigned int>(_v.size());
auto res = binary<T>::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<std::is_default_constru
size_t bytes=0;
if(_store_size)
{
unsigned int N = _v.size();
unsigned int N = static_cast<unsigned int>(_v.size());
bytes += binary<unsigned int>::store( _os, N, _swap );
}
if (_swap)

View File

@@ -25,7 +25,7 @@ template <> struct binary< std::vector<bool> >
if(_store_size)
{
unsigned int size_N = _v.size();
unsigned int size_N = static_cast<unsigned int>(_v.size());
bytes += binary<unsigned int>::store( _ostr, size_N, _swap );
}