diff --git a/src/common/utils.h b/src/common/utils.h index e64ce844..4f14e4fd 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -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); }