From b62a930962272f796db61708976fb03aae7cbd4c Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" <uwelk@xhochy.com> Date: Sun, 12 Oct 2014 16:13:38 +0100 Subject: [PATCH] Remove .data() calls for readability --- src/libtomahawk/database/Database.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libtomahawk/database/Database.cpp b/src/libtomahawk/database/Database.cpp index 4323cf293..e9d972b2f 100644 --- a/src/libtomahawk/database/Database.cpp +++ b/src/libtomahawk/database/Database.cpp @@ -242,21 +242,21 @@ Database::enqueue( const Tomahawk::dbcmd_ptr& lc ) { 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; } busyThreads++; - if ( ( !happyWorker && workerThread && workerThread.data()->worker() ) || - ( workerThread && workerThread.data()->worker() && workerThread.data()->worker().data()->outstandingJobs() < happyWorker.data()->outstandingJobs() ) ) - happyWorker = workerThread.data()->worker(); + if ( ( !happyWorker && workerThread && workerThread->worker() ) || + ( workerThread && workerThread->worker() && workerThread->worker()->outstandingJobs() < happyWorker->outstandingJobs() ) ) + happyWorker = workerThread->worker(); } tDebug( LOGVERBOSE ) << "Enqueueing command to thread:" << happyWorker << busyThreads << lc->commandname(); Q_ASSERT( happyWorker ); - happyWorker.data()->enqueue( lc ); + happyWorker->enqueue( lc ); } }