Commit 6a246526 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Corrected return type for Pool::pop

parent 3da987ce
......@@ -30,7 +30,7 @@ Instance::Instance()
{
char const *argv[] =
{
"-vvvvv",
// "-vvvvv",
"--no-skip-frames",
// "--intf", "dummy",
"--text-renderer", "dummy",
......
......@@ -41,7 +41,9 @@ public:
Q_ASSERT( m_pool.empty() == true );
delete m_mutex;
}
T pop()
//Yes, this is a const T, not a const T&
//This is usefull when manipulating copy on write :)
const T pop()
{
QMutexLocker lock( m_mutex );
if ( m_pool.size() == 0 )
......@@ -49,8 +51,7 @@ public:
qCritical() << "Pool is empty !!";
return NULL;
}
T ret = m_pool.dequeue();
return ret;
return m_pool.dequeue();
}
const T& head() const
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment