Commit b97524df authored by Miroslav Goncharenko's avatar Miroslav Goncharenko Committed by Oleg Nabiullin

[sample_hevc_fei_abr] Less copying of smart pointers

parent deab5bb5
......@@ -59,7 +59,7 @@ public:
// Weakness in design. Consider using a customer deleter for T
// instead of explicit FeiBufferAllocator
void SetDeleter(std::shared_ptr<FeiBufferAllocator> allocator)
void SetDeleter(std::shared_ptr<FeiBufferAllocator> & allocator)
{
m_allocator = allocator;
}
......@@ -80,9 +80,10 @@ public:
m_condition.wait(lock, [this] { return !m_pool.empty(); });
}
Type temp(m_pool.front().release(), Return2Pool(this) );
auto tmp = m_pool.front().release();
m_pool.pop_front();
return std::move(temp);
return Type(tmp, Return2Pool(this));
}
bool empty() 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