diff --git a/include/serializedAsynchronousContinuation.h b/include/serializedAsynchronousContinuation.h index 6af0bc4..b0bcf4b 100644 --- a/include/serializedAsynchronousContinuation.h +++ b/include/serializedAsynchronousContinuation.h @@ -38,7 +38,8 @@ public: } // Return list of all qutexes in predecessors' LockSets; excludes self. - std::unique_ptr>> + [[nodiscard]] + std::unique_ptr>>&& getAcquiredQutexHistory() const; public: diff --git a/smocore/serializedAsynchronousContinuation.cpp b/smocore/serializedAsynchronousContinuation.cpp index 4d76bda..0b86094 100644 --- a/smocore/serializedAsynchronousContinuation.cpp +++ b/smocore/serializedAsynchronousContinuation.cpp @@ -182,7 +182,7 @@ SerializedAsynchronousContinuation #endif template -std::unique_ptr>> +std::unique_ptr>>&& SerializedAsynchronousContinuation::getAcquiredQutexHistory() const { @@ -213,7 +213,7 @@ const } } - return heldLocks; + return std::move(heldLocks); } // Explicit template instantiations for the types we need