summaryrefslogtreecommitdiff
path: root/src/decoder/DecoderControl.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-01-03 07:11:57 +0100
committerMax Kellermann <max@musicpd.org>2017-01-03 07:11:57 +0100
commit2e182e84c35c73f8d5b4f135ffa3550b7e70f66f (patch)
tree806ec01525f834132c46e6392714900ec75eada2 /src/decoder/DecoderControl.hxx
parenta42021655c3218c64272b648438197247ec7f6a9 (diff)
thread/Mutex: remove ScopeLock, use std::lock_guard directly
Diffstat (limited to 'src/decoder/DecoderControl.hxx')
-rw-r--r--src/decoder/DecoderControl.hxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/decoder/DecoderControl.hxx b/src/decoder/DecoderControl.hxx
index d21b0e2dc..c59c67f41 100644
--- a/src/decoder/DecoderControl.hxx
+++ b/src/decoder/DecoderControl.hxx
@@ -228,7 +228,7 @@ struct DecoderControl {
gcc_pure
bool LockIsIdle() const {
- const ScopeLock protect(mutex);
+ const std::lock_guard<Mutex> protect(mutex);
return IsIdle();
}
@@ -238,7 +238,7 @@ struct DecoderControl {
gcc_pure
bool LockIsStarting() const {
- const ScopeLock protect(mutex);
+ const std::lock_guard<Mutex> protect(mutex);
return IsStarting();
}
@@ -250,7 +250,7 @@ struct DecoderControl {
gcc_pure
bool LockHasFailed() const {
- const ScopeLock protect(mutex);
+ const std::lock_guard<Mutex> protect(mutex);
return HasFailed();
}
@@ -281,7 +281,7 @@ struct DecoderControl {
* Like CheckRethrowError(), but locks and unlocks the object.
*/
void LockCheckRethrowError() const {
- const ScopeLock protect(mutex);
+ const std::lock_guard<Mutex> protect(mutex);
CheckRethrowError();
}
@@ -309,7 +309,7 @@ struct DecoderControl {
gcc_pure
bool LockIsCurrentSong(const DetachedSong &_song) const {
- const ScopeLock protect(mutex);
+ const std::lock_guard<Mutex> protect(mutex);
return IsCurrentSong(_song);
}
@@ -346,13 +346,13 @@ private:
* object.
*/
void LockSynchronousCommand(DecoderCommand cmd) {
- const ScopeLock protect(mutex);
+ const std::lock_guard<Mutex> protect(mutex);
ClearError();
SynchronousCommandLocked(cmd);
}
void LockAsynchronousCommand(DecoderCommand cmd) {
- const ScopeLock protect(mutex);
+ const std::lock_guard<Mutex> protect(mutex);
command = cmd;
Signal();
}