mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Make owning_lock's template parameter titlecase instead of uppercase
This commit is contained in:
parent
af0e08e9f1
commit
f297543ca1
1 changed files with 4 additions and 4 deletions
|
@ -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 <typename DATA>
|
||||
template <typename Data>
|
||||
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<DATA> acquire() { return {lock, &data}; }
|
||||
acquired_lock<Data> acquire() { return {lock, &data}; }
|
||||
};
|
||||
|
||||
/// A scoped manager to save the current value of some variable, and optionally set it to a new
|
||||
|
|
Loading…
Reference in a new issue