SerializedAsyncContin:getAcquiredQutexHistory returns rval ref
This ensures that the caller takes ownership.
This commit is contained in:
@@ -38,7 +38,8 @@ public:
|
||||
}
|
||||
|
||||
// Return list of all qutexes in predecessors' LockSets; excludes self.
|
||||
std::unique_ptr<std::forward_list<std::reference_wrapper<Qutex>>>
|
||||
[[nodiscard]]
|
||||
std::unique_ptr<std::forward_list<std::reference_wrapper<Qutex>>>&&
|
||||
getAcquiredQutexHistory() const;
|
||||
|
||||
public:
|
||||
|
||||
@@ -182,7 +182,7 @@ SerializedAsynchronousContinuation<OriginalCbFnT>
|
||||
#endif
|
||||
|
||||
template <class OriginalCbFnT>
|
||||
std::unique_ptr<std::forward_list<std::reference_wrapper<Qutex>>>
|
||||
std::unique_ptr<std::forward_list<std::reference_wrapper<Qutex>>>&&
|
||||
SerializedAsynchronousContinuation<OriginalCbFnT>::getAcquiredQutexHistory()
|
||||
const
|
||||
{
|
||||
@@ -213,7 +213,7 @@ const
|
||||
}
|
||||
}
|
||||
|
||||
return heldLocks;
|
||||
return std::move(heldLocks);
|
||||
}
|
||||
|
||||
// Explicit template instantiations for the types we need
|
||||
|
||||
Reference in New Issue
Block a user