fixed some warnings

This commit is contained in:
Arvid Norberg 2006-09-24 11:32:08 +00:00
parent 80dc56d388
commit 5aa875c2af
2 changed files with 3 additions and 6 deletions

View File

@ -57,10 +57,8 @@ namespace libtorrent
{
if (addr.is_v4())
return m_filter4.access(addr.to_v4());
else if (addr.is_v6())
return m_filter6.access(addr.to_v6());
else
assert(false);
assert(addr.is_v6());
return m_filter6.access(addr.to_v6());
}
ip_filter::filter_tuple_t ip_filter::export_filter() const

View File

@ -236,8 +236,7 @@ void node_impl::refresh_bucket(int bucket)
target[(num_bits - 1) / 8] |=
(~(m_id[(num_bits - 1) / 8])) & (0x80 >> ((num_bits - 1) % 8));
int new_bucket = distance_exp(m_id, target);
assert(new_bucket == bucket);
assert(distance_exp(m_id, target) == bucket);
std::vector<node_entry> start;
start.reserve(m_table.bucket_size());