mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
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:
parent
a38f44b1fd
commit
17fa1b6fed
2 changed files with 3 additions and 3 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue