build fix

This commit is contained in:
Arvid Norberg 2015-03-08 04:49:10 +00:00
parent bfaf7cb28c
commit 14e97b8151
1 changed files with 2 additions and 1 deletions

View File

@ -34,6 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include <cmath> #include <cmath>
#include <algorithm> #include <algorithm>
#include <numeric> #include <numeric>
#include <limits>
#include <boost/bind.hpp> #include <boost/bind.hpp>
#include <boost/tuple/tuple.hpp> #include <boost/tuple/tuple.hpp>
@ -215,7 +216,7 @@ namespace libtorrent
, m_downloads[download_state].end(), ret); , m_downloads[download_state].end(), ret);
TORRENT_ASSERT(i == m_downloads[download_state].end() || i->index != piece); TORRENT_ASSERT(i == m_downloads[download_state].end() || i->index != piece);
TORRENT_ASSERT(block_index >= 0); TORRENT_ASSERT(block_index >= 0);
TORRENT_ASSERT(block_index < UINT16_MAX); TORRENT_ASSERT(block_index < (std::numeric_limits<boost::uint16_t>::max)());
ret.info_idx = block_index; ret.info_idx = block_index;
TORRENT_ASSERT(int(ret.info_idx) * m_blocks_per_piece TORRENT_ASSERT(int(ret.info_idx) * m_blocks_per_piece
+ m_blocks_per_piece <= m_block_info.size()); + m_blocks_per_piece <= m_block_info.size());