marked expensive invariant check to only be included in full checks in piece-picker

This commit is contained in:
Arvid Norberg 2008-10-05 23:28:57 +00:00
parent 894d623729
commit f6a1e467a8
1 changed files with 2 additions and 0 deletions

View File

@ -1046,7 +1046,9 @@ namespace libtorrent
// be removed from the available piece list.
void piece_picker::we_have(int index)
{
#ifdef TORRENT_EXPENSIVE_INVARIANT_CHECKS
TORRENT_PIECE_PICKER_INVARIANT_CHECK;
#endif
TORRENT_ASSERT(index >= 0);
TORRENT_ASSERT(index < (int)m_piece_map.size());