Get rid of rvalue ref returns

This commit is contained in:
2025-09-30 00:37:54 -04:00
parent ed9635582f
commit 4bf19fda90
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -133,7 +133,7 @@ public:
* @param dontAcquireLock If true, skips acquiring the internal spinlock * @param dontAcquireLock If true, skips acquiring the internal spinlock
* (assumes caller already holds it) * (assumes caller already holds it)
*/ */
[[nodiscard]] std::unique_ptr<DependencyGraph>&& generateGraph( [[nodiscard]] std::unique_ptr<DependencyGraph> generateGraph(
bool dontAcquireLock = false); bool dontAcquireLock = false);
// Disable copy constructor and assignment operator // Disable copy constructor and assignment operator
+1 -1
View File
@@ -39,7 +39,7 @@ public:
// Return list of all qutexes in predecessors' LockSets; excludes self. // Return list of all qutexes in predecessors' LockSets; excludes self.
[[nodiscard]] [[nodiscard]]
std::unique_ptr<std::forward_list<std::reference_wrapper<Qutex>>>&& std::unique_ptr<std::forward_list<std::reference_wrapper<Qutex>>>
getAcquiredQutexHistory() const; getAcquiredQutexHistory() const;
public: public:
+2 -2
View File
@@ -114,7 +114,7 @@ void DependencyGraph::dfsCycleDetection(
} }
// QutexAcquisitionHistoryTracker implementation // QutexAcquisitionHistoryTracker implementation
std::unique_ptr<DependencyGraph>&& std::unique_ptr<DependencyGraph>
QutexAcquisitionHistoryTracker::generateGraph(bool dontAcquireLock) QutexAcquisitionHistoryTracker::generateGraph(bool dontAcquireLock)
{ {
auto graph = std::make_unique<DependencyGraph>(); auto graph = std::make_unique<DependencyGraph>();
@@ -169,7 +169,7 @@ QutexAcquisitionHistoryTracker::generateGraph(bool dontAcquireLock)
acquisitionHistoryLock.release(); acquisitionHistoryLock.release();
} }
return std::move(graph); return graph;
} }
/** EXPLANATION - GRIDLOCK DETECTION ALGORITHM: /** EXPLANATION - GRIDLOCK DETECTION ALGORITHM:
@@ -198,7 +198,7 @@ SerializedAsynchronousContinuation<OriginalCbFnT>
#endif #endif
template <class OriginalCbFnT> 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() SerializedAsynchronousContinuation<OriginalCbFnT>::getAcquiredQutexHistory()
const const
{ {
@@ -229,7 +229,7 @@ const
} }
} }
return std::move(heldLocks); return heldLocks;
} }
// Explicit template instantiations for the types we need // Explicit template instantiations for the types we need