fix build

This commit is contained in:
Arvid Norberg 2012-01-20 06:07:19 +00:00
parent ed56520d24
commit ef1d8b5921
2 changed files with 9 additions and 2 deletions

View File

@ -502,6 +502,14 @@ namespace libtorrent
--m_disk_queues[channel];
}
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
bool in_state_updates(boost::shared_ptr<torrent> t)
{
return std::find_if(m_state_updates.begin(), m_state_updates.end()
, boost::bind(&boost::weak_ptr<torrent>::lock, _1) == t) != m_state_updates.end();
}
#endif
void add_to_update_queue(boost::weak_ptr<torrent> t)
{
TORRENT_ASSERT(std::find_if(m_state_updates.begin(), m_state_updates.end()

View File

@ -8002,8 +8002,7 @@ namespace libtorrent
if (!m_state_subscription) return;
if (m_in_state_updates)
{
TORRENT_ASSERT(std::find_if(m_ses.m_state_updates.begin(), m_ses.m_state_updates.end()
, boost::bind(&boost::weak_ptr<torrent>::lock, _1) == shared_from_this()) != m_ses.m_state_updates.end());
TORRENT_ASSERT(m_ses.in_state_updates(shared_from_this()));
return;
}