diff --git a/src/common.h b/src/common.h index 98785ab24..8f970db6f 100644 --- a/src/common.h +++ b/src/common.h @@ -648,7 +648,7 @@ class acquired_lock { // A lock that owns a piece of data // Access to the data is only provided by taking the lock -template +template class owning_lock { // No copying owning_lock &operator=(const scoped_lock &) = delete; @@ -657,13 +657,13 @@ class owning_lock { owning_lock &operator=(owning_lock &&) = default; std::mutex lock; - DATA data; + Data data; public: - owning_lock(DATA &&d) : data(std::move(d)) {} + owning_lock(Data &&d) : data(std::move(d)) {} owning_lock() : data() {} - acquired_lock acquire() { return {lock, &data}; } + acquired_lock acquire() { return {lock, &data}; } }; /// A scoped manager to save the current value of some variable, and optionally set it to a new