made the invariant check more strict

This commit is contained in:
Arvid Norberg 2008-08-10 10:22:36 +00:00
parent 54a5dd4af4
commit 56ae82be2c
1 changed files with 3 additions and 3 deletions

View File

@ -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