fixed build warnings

This commit is contained in:
Arvid Norberg
2011-02-14 01:59:01 +00:00
parent 8bb71da401
commit 5864a883e6
10 changed files with 23 additions and 19 deletions

View File

@@ -57,9 +57,7 @@ namespace libtorrent
for (int j = 0; j < 5 && channel[j]; ++j)
{
if (channel[j]->throttle() == 0) continue;
TORRENT_ASSERT(channel[j]->distribute_quota
< (std::numeric_limits<boost::uint64_t>::max)() / priority);
quota = (std::min)(int(boost::uint64_t(channel[j]->distribute_quota)
quota = (std::min)(int(boost::int64_t(channel[j]->distribute_quota)
* priority / channel[j]->tmp), quota);
}
assigned += quota;