mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
Catch by const ref and assert to check hypothesis
This commit is contained in:
parent
7b8136a36e
commit
a8f0053fc8
@ -176,10 +176,12 @@ Album::id() const
|
||||
s_albumsById[ m_id ] = m_ownRef.toStrongRef();
|
||||
s_idMutex.unlock();
|
||||
}
|
||||
catch( boost::future_uninitialized& e )
|
||||
catch( const boost::future_uninitialized& e )
|
||||
{
|
||||
qWarning() << "Caught boost::future_uninitialized when trying to get artist id from future, WTF?";
|
||||
qWarning() << "Potential race condition, do we have an ID?" << m_id << "and waiting?" << m_waitingForId << e.what();
|
||||
|
||||
Q_ASSERT( !m_waitingForId );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -256,10 +256,12 @@ Artist::id() const
|
||||
s_artistsById[ m_id ] = m_ownRef.toStrongRef();
|
||||
s_idMutex.unlock();
|
||||
}
|
||||
catch( boost::future_uninitialized& e )
|
||||
catch( const boost::future_uninitialized& e )
|
||||
{
|
||||
qWarning() << "Caught boost::future_uninitialized when trying to get artist id from future, WTF?";
|
||||
qWarning() << "Potential race condition, do we have an ID?" << m_id << "and waiting?" << m_waitingForFuture << e.what();
|
||||
|
||||
Q_ASSERT( !m_waitingForFuture );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user