fixed clang build warning

This commit is contained in:
Arvid Norberg 2011-03-09 03:59:59 +00:00
parent 2f63718eb7
commit 6d9e4daa1f
1 changed files with 13 additions and 1 deletions

View File

@ -54,12 +54,24 @@ namespace libtorrent
for (int i = 0; i < (int)sizeof(T); ++i)
{
ret <<= 8;
ret |= static_cast<unsigned char>(*start);
ret |= static_cast<boost::uint8_t>(*start);
++start;
}
return ret;
}
template <class InIt>
boost::uint8_t read_impl(InIt& start, type<boost::uint8_t>)
{
return static_cast<boost::uint8_t>(*start++);
}
template <class InIt>
boost::int8_t read_impl(InIt& start, type<boost::int8_t>)
{
return static_cast<boost::int8_t>(*start++);
}
template <class T, class OutIt>
inline void write_impl(T val, OutIt& start)
{