1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-04 05:07:27 +02:00

Remove .data() calls for readability

This commit is contained in:
Uwe L. Korn
2014-10-12 16:13:38 +01:00
parent 552f82a5ca
commit b62a930962

View File

@@ -242,21 +242,21 @@ Database::enqueue( const Tomahawk::dbcmd_ptr& lc )
{ {
workerThread = m_workerThreads.at( i ); workerThread = m_workerThreads.at( i );
if ( workerThread && workerThread.data()->worker() && !workerThread.data()->worker().data()->busy() ) if ( workerThread && workerThread->worker() && !workerThread->worker()->busy() )
{ {
happyWorker = workerThread.data()->worker(); happyWorker = workerThread->worker();
break; break;
} }
busyThreads++; busyThreads++;
if ( ( !happyWorker && workerThread && workerThread.data()->worker() ) || if ( ( !happyWorker && workerThread && workerThread->worker() ) ||
( workerThread && workerThread.data()->worker() && workerThread.data()->worker().data()->outstandingJobs() < happyWorker.data()->outstandingJobs() ) ) ( workerThread && workerThread->worker() && workerThread->worker()->outstandingJobs() < happyWorker->outstandingJobs() ) )
happyWorker = workerThread.data()->worker(); happyWorker = workerThread->worker();
} }
tDebug( LOGVERBOSE ) << "Enqueueing command to thread:" << happyWorker << busyThreads << lc->commandname(); tDebug( LOGVERBOSE ) << "Enqueueing command to thread:" << happyWorker << busyThreads << lc->commandname();
Q_ASSERT( happyWorker ); Q_ASSERT( happyWorker );
happyWorker.data()->enqueue( lc ); happyWorker->enqueue( lc );
} }
} }