fixed warnings and removed unused variables

This commit is contained in:
Arvid Norberg 2007-05-02 18:45:29 +00:00
parent 04e41cf702
commit 13bcb48dba
2 changed files with 3 additions and 7 deletions

View File

@ -2069,9 +2069,7 @@ namespace libtorrent
assert(!m_unallocated_slots.empty());
const int piece_size = static_cast<int>(m_info.piece_length());
const int stack_buffer_size = 16*16*1024;
const int stack_buffer_size = 16*1024;
char zeroes[stack_buffer_size];
memset(zeroes, 0, stack_buffer_size);
@ -2080,8 +2078,6 @@ namespace libtorrent
for (int i = 0; i < num_slots && !m_unallocated_slots.empty(); ++i)
{
int pos = m_unallocated_slots.front();
// int piece_pos = pos;
bool write_back = false;
int new_free_slot = pos;
if (m_piece_to_slot[pos] != has_no_slot)

View File

@ -2040,8 +2040,8 @@ namespace libtorrent
bool torrent::want_more_peers() const
{
return m_connections.size() < m_connections_quota.given
&& m_ses.m_half_open.size() < m_ses.m_half_open_limit;
return int(m_connections.size()) < m_connections_quota.given
&& int(m_ses.m_half_open.size()) < m_ses.m_half_open_limit;
}