promote some piece picker invariant checks to 'expensive'

This commit is contained in:
Arvid Norberg
2010-09-01 03:00:15 +00:00
parent 3bb79824ed
commit 29e45c8cbb

View File

@@ -835,7 +835,10 @@ namespace libtorrent
void piece_picker::inc_refcount_all() void piece_picker::inc_refcount_all()
{ {
#ifdef TORRENT_EXPENSIVE_INVARIANT_CHECKS
TORRENT_PIECE_PICKER_INVARIANT_CHECK; TORRENT_PIECE_PICKER_INVARIANT_CHECK;
#endif
++m_seeds; ++m_seeds;
if (m_seeds == 1) if (m_seeds == 1)
{ {
@@ -848,7 +851,9 @@ namespace libtorrent
void piece_picker::dec_refcount_all() void piece_picker::dec_refcount_all()
{ {
#ifdef TORRENT_EXPENSIVE_INVARIANT_CHECKS
TORRENT_PIECE_PICKER_INVARIANT_CHECK; TORRENT_PIECE_PICKER_INVARIANT_CHECK;
#endif
if (m_seeds > 0) if (m_seeds > 0)
{ {