disable invariant_check functions when invariant checks are disabled

This commit is contained in:
Arvid Norberg
2013-02-25 04:13:46 +00:00
parent 775cf5570a
commit a0caa0f4b2
28 changed files with 38 additions and 36 deletions

View File

@@ -79,7 +79,7 @@ namespace libtorrent
#ifdef TORRENT_PICKER_LOG
std::cerr << "new piece_picker" << std::endl;
#endif
#ifdef TORRENT_DEBUG
#if defined TORRENT_DEBUG && !defined TORRENT_DISABLE_INVARIANT_CHECKS
check_invariant();
#endif
}
@@ -273,8 +273,10 @@ namespace libtorrent
}
std::cerr << std::endl;
}
#endif
#endif // TORRENT_PIECE_PICKER
#endif // TORRENT_DEBUG
#if defined TORRENT_DEBUG && !defined TORRENT_DISABLE_INVARIANT_CHECKS
void piece_picker::check_invariant(const torrent* t) const
{
#ifndef TORRENT_DEBUG_REFCOUNTS