*** empty log message ***
This commit is contained in:
parent
79a9a59fbf
commit
705e40fda6
|
@ -90,6 +90,7 @@ namespace libtorrent
|
|||
if (v >= 0 && v < 10) return '0' + v;
|
||||
else if (v >= 10) return 'A' + (v - 10);
|
||||
assert(false);
|
||||
return '0';
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -133,7 +133,7 @@ namespace libtorrent
|
|||
}
|
||||
}
|
||||
#ifndef NDEBUG
|
||||
integrity_check();
|
||||
// integrity_check();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -368,7 +368,7 @@ namespace libtorrent
|
|||
move(true, m_piece_map[index].peer_count, m_piece_map[index].index);
|
||||
|
||||
#ifndef NDEBUG
|
||||
integrity_check();
|
||||
// integrity_check();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -389,7 +389,7 @@ namespace libtorrent
|
|||
move(m_piece_map[i].downloading, peer_count, index);
|
||||
|
||||
#ifndef NDEBUG
|
||||
integrity_check();
|
||||
// integrity_check();
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
@ -423,7 +423,7 @@ namespace libtorrent
|
|||
assert(info_index != 0xffffff);
|
||||
remove(m_piece_map[index].downloading, peer_count, info_index);
|
||||
#ifndef NDEBUG
|
||||
integrity_check();
|
||||
// integrity_check();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -435,7 +435,7 @@ namespace libtorrent
|
|||
assert(pieces.size() == m_piece_map.size());
|
||||
|
||||
#ifndef NDEBUG
|
||||
integrity_check();
|
||||
// integrity_check();
|
||||
#endif
|
||||
|
||||
// free refers to pieces that are free to download, noone else
|
||||
|
@ -582,7 +582,7 @@ namespace libtorrent
|
|||
void piece_picker::mark_as_downloading(piece_block block, const address& peer)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
integrity_check();
|
||||
// integrity_check();
|
||||
#endif
|
||||
assert(block.piece_index >= 0);
|
||||
assert(block.block_index >= 0);
|
||||
|
@ -611,14 +611,14 @@ namespace libtorrent
|
|||
i->requested_blocks[block.block_index] = 1;
|
||||
}
|
||||
#ifndef NDEBUG
|
||||
integrity_check();
|
||||
// integrity_check();
|
||||
#endif
|
||||
}
|
||||
|
||||
void piece_picker::mark_as_finished(piece_block block, const address& peer)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
integrity_check();
|
||||
// integrity_check();
|
||||
#endif
|
||||
assert(block.piece_index >= 0);
|
||||
assert(block.block_index >= 0);
|
||||
|
@ -648,7 +648,7 @@ namespace libtorrent
|
|||
i->finished_blocks[block.block_index] = 1;
|
||||
}
|
||||
#ifndef NDEBUG
|
||||
integrity_check();
|
||||
// integrity_check();
|
||||
#endif
|
||||
}
|
||||
/*
|
||||
|
@ -717,7 +717,7 @@ namespace libtorrent
|
|||
void piece_picker::abort_download(piece_block block)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
integrity_check();
|
||||
// integrity_check();
|
||||
#endif
|
||||
|
||||
assert(block.piece_index >= 0);
|
||||
|
@ -752,7 +752,7 @@ namespace libtorrent
|
|||
move(true, m_piece_map[block.piece_index].peer_count, m_piece_map[block.piece_index].index);
|
||||
}
|
||||
#ifndef NDEBUG
|
||||
integrity_check();
|
||||
// integrity_check();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -905,7 +905,6 @@ namespace libtorrent
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
// TODO: add a check to see if filenames are accepted on the
|
||||
// current platform.
|
||||
// if the torrent already exists, this will throw duplicate_torrent
|
||||
|
@ -947,7 +946,7 @@ namespace libtorrent
|
|||
d.save_path = save_path;
|
||||
d.info_hash = ti.info_hash();
|
||||
d.resume_data = resume_data;
|
||||
|
||||
|
||||
// add the torrent to the queue to be checked
|
||||
m_checker_impl.m_torrents.push_back(d);
|
||||
// and notify the thread that it got another
|
||||
|
@ -1301,11 +1300,11 @@ namespace libtorrent
|
|||
, boost::bind((mem_fun_type)&entry::integer, _1));
|
||||
#endif
|
||||
|
||||
if (tmp_pieces.size() == info.num_pieces()
|
||||
if ((int)tmp_pieces.size() == info.num_pieces()
|
||||
&& std::find_if(tmp_pieces.begin(), tmp_pieces.end()
|
||||
, boost::bind(std::less<int>(), _1, 0)) == tmp_pieces.end())
|
||||
{
|
||||
if (info.num_files() != file_sizes.size())
|
||||
if (info.num_files() != (int)file_sizes.size())
|
||||
return;
|
||||
|
||||
std::vector<size_type>::iterator fs = file_sizes.begin();
|
||||
|
|
|
@ -158,11 +158,9 @@ namespace libtorrent
|
|||
int old_num_pieces = static_cast<int>(m_piece_hash.size());
|
||||
|
||||
m_piece_hash.resize(num_pieces);
|
||||
for (std::vector<sha1_hash>::iterator i = m_piece_hash.begin() + old_num_pieces;
|
||||
i != m_piece_hash.end();
|
||||
++i)
|
||||
for (int i = old_num_pieces; i < num_pieces; ++i)
|
||||
{
|
||||
i->clear();
|
||||
m_piece_hash[i].clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue