Merge branch 'FixBinaryWarnings' into 'master'
fix warnings in binary See merge request OpenMesh/OpenMesh!312
This commit is contained in:
@@ -337,7 +337,7 @@ struct binary< std::vector< T >, typename std::enable_if<std::is_default_constru
|
|||||||
{
|
{
|
||||||
if(binary<T>::size_of() != IO::UnknownSize)
|
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);
|
auto res = binary<T>::size_of()*_v.size() + (_store_size? sizeof(decltype(N)) : 0);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -359,7 +359,7 @@ struct binary< std::vector< T >, typename std::enable_if<std::is_default_constru
|
|||||||
size_t bytes=0;
|
size_t bytes=0;
|
||||||
if(_store_size)
|
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 );
|
bytes += binary<unsigned int>::store( _os, N, _swap );
|
||||||
}
|
}
|
||||||
if (_swap)
|
if (_swap)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ template <> struct binary< std::vector<bool> >
|
|||||||
|
|
||||||
if(_store_size)
|
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 );
|
bytes += binary<unsigned int>::store( _ostr, size_N, _swap );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user