From d168a709a27f7e146c9cc7c3bdc19a2aeb1a768b Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 9 Sep 2009 16:34:50 +0000 Subject: [PATCH] promote an assert to expensive invariant checks only --- src/torrent.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/torrent.cpp b/src/torrent.cpp index 96251c7c9..b723f0d68 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -1732,8 +1732,10 @@ namespace libtorrent for (int j = 0; j < blocks_per_piece; ++j) { +#ifdef TORRENT_EXPENSIVE_INVARIANT_CHECKS TORRENT_ASSERT(m_picker->is_finished(piece_block(index, j)) == (i->info[j].state == piece_picker::block_info::state_finished)); +#endif if (i->info[j].state == piece_picker::block_info::state_finished) { corr += block_bytes_wanted(piece_block(index, j));