diff options
author | Max Kellermann <max@musicpd.org> | 2017-01-03 07:11:57 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-01-03 07:11:57 +0100 |
commit | 2e182e84c35c73f8d5b4f135ffa3550b7e70f66f (patch) | |
tree | 806ec01525f834132c46e6392714900ec75eada2 /src/mixer | |
parent | a42021655c3218c64272b648438197247ec7f6a9 (diff) |
thread/Mutex: remove ScopeLock, use std::lock_guard directly
Diffstat (limited to 'src/mixer')
-rw-r--r-- | src/mixer/MixerControl.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mixer/MixerControl.cxx b/src/mixer/MixerControl.cxx index 33f26ccc9..df7b384dc 100644 --- a/src/mixer/MixerControl.cxx +++ b/src/mixer/MixerControl.cxx @@ -53,7 +53,7 @@ mixer_open(Mixer *mixer) { assert(mixer != nullptr); - const ScopeLock protect(mixer->mutex); + const std::lock_guard<Mutex> protect(mixer->mutex); if (mixer->open) return; @@ -83,7 +83,7 @@ mixer_close(Mixer *mixer) { assert(mixer != nullptr); - const ScopeLock protect(mixer->mutex); + const std::lock_guard<Mutex> protect(mixer->mutex); if (mixer->open) mixer_close_internal(mixer); @@ -120,7 +120,7 @@ mixer_get_volume(Mixer *mixer) if (mixer->plugin.global && !mixer->failed) mixer_open(mixer); - const ScopeLock protect(mixer->mutex); + const std::lock_guard<Mutex> protect(mixer->mutex); if (mixer->open) { try { @@ -144,7 +144,7 @@ mixer_set_volume(Mixer *mixer, unsigned volume) if (mixer->plugin.global && !mixer->failed) mixer_open(mixer); - const ScopeLock protect(mixer->mutex); + const std::lock_guard<Mutex> protect(mixer->mutex); if (mixer->open) mixer->SetVolume(volume); |