Fix compiler warnings raised by llvm 8.0.

Warning was:

warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
This commit is contained in:
Johanna Amann 2017-03-13 11:16:19 -07:00
parent a38f44b1fd
commit 17fa1b6fed
2 changed files with 3 additions and 3 deletions

View file

@ -124,7 +124,7 @@ inline static std::unique_lock<std::mutex> acquire_lock(std::mutex& m)
{
try
{
return std::move(std::unique_lock<std::mutex>(m));
return std::unique_lock<std::mutex>(m);
}
catch ( const std::system_error& e )
{
@ -224,7 +224,7 @@ inline std::vector<std::unique_lock<std::mutex>> Queue<T>::LocksForAllQueues()
throw std::exception();
}
return std::move(locks);
return locks;
}
template<typename T>