From 56ae82be2ce9aa52a42bda49c10607f32e303160 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 10 Aug 2008 10:22:36 +0000 Subject: [PATCH] made the invariant check more strict --- src/torrent.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/torrent.cpp b/src/torrent.cpp index 3d1308f77..cf3c62602 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -3398,11 +3398,11 @@ namespace libtorrent // if there are torrents waiting to be checked // assert that there's a torrent that is being // processed right now - bool found = false; + int found = 0; for (aux::session_impl::torrent_map::iterator i = m_ses.m_torrents.begin() , end(m_ses.m_torrents.end()); i != end; ++i) - if (i->second->m_state == torrent_status::checking_files) found = true; - TORRENT_ASSERT(found); + if (i->second->m_state == torrent_status::checking_files) ++found; + TORRENT_ASSERT(found == 1); } TORRENT_ASSERT(m_resume_entry.type() == lazy_entry::dict_t