support release asserts

This commit is contained in:
Arvid Norberg
2011-05-08 09:04:59 +00:00
parent aeb90205c7
commit a73960aa5a
21 changed files with 59 additions and 53 deletions

View File

@@ -610,7 +610,7 @@ namespace libtorrent
// update our torrent_info object and move the
// torrent from the old info-hash to the new one
// as we replace the torrent_info object
#ifdef TORRENT_DEBUG
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
int num_torrents = m_ses.m_torrents.size();
#endif
// we're about to erase the session's reference to this
@@ -718,7 +718,7 @@ namespace libtorrent
// update our torrent_info object and move the
// torrent from the old info-hash to the new one
// as we replace the torrent_info object
#ifdef TORRENT_DEBUG
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
int num_torrents = m_ses.m_torrents.size();
#endif
m_ses.m_torrents.erase(m_torrent_file->info_hash());
@@ -5237,7 +5237,7 @@ namespace libtorrent
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_ERROR_LOGGING
(*p->m_logger) << "*** CLOSING CONNECTION: " << ec.message() << "\n";
#endif
#ifdef TORRENT_DEBUG
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
std::size_t size = m_connections.size();
#endif
if (p->is_disconnecting())
@@ -5308,7 +5308,7 @@ namespace libtorrent
peer_connection* p = *i;
++ret;
TORRENT_ASSERT(p->associated_torrent().lock().get() == this);
#ifdef TORRENT_DEBUG
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
int num_conns = m_connections.size();
#endif
p->disconnect(ec);