mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 03:50:11 +02:00
Prevent unnecessary copies in ScopedValueCache
This commit is contained in:
+1
-1
@@ -177,7 +177,7 @@ class ScopedValueCache {
|
||||
* @throw std::runtime_error When we are already caching a value.
|
||||
*/
|
||||
Guard set(T new_value) {
|
||||
value = new_value;
|
||||
value = std::move(new_value);
|
||||
|
||||
return Guard(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user