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/MusicPipe.cxx | |
parent | a42021655c3218c64272b648438197247ec7f6a9 (diff) |
thread/Mutex: remove ScopeLock, use std::lock_guard directly
Diffstat (limited to 'src/MusicPipe.cxx')
-rw-r--r-- | src/MusicPipe.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/MusicPipe.cxx b/src/MusicPipe.cxx index 9f62c40f7..cac9bb26b 100644 --- a/src/MusicPipe.cxx +++ b/src/MusicPipe.cxx @@ -27,7 +27,7 @@ bool MusicPipe::Contains(const MusicChunk *chunk) const { - const ScopeLock protect(mutex); + const std::lock_guard<Mutex> protect(mutex); for (const MusicChunk *i = head; i != nullptr; i = i->next) if (i == chunk) @@ -41,7 +41,7 @@ MusicPipe::Contains(const MusicChunk *chunk) const MusicChunk * MusicPipe::Shift() { - const ScopeLock protect(mutex); + const std::lock_guard<Mutex> protect(mutex); MusicChunk *chunk = head; if (chunk != nullptr) { @@ -87,7 +87,7 @@ MusicPipe::Push(MusicChunk *chunk) assert(!chunk->IsEmpty()); assert(chunk->length == 0 || chunk->audio_format.IsValid()); - const ScopeLock protect(mutex); + const std::lock_guard<Mutex> protect(mutex); assert(size > 0 || !audio_format.IsDefined()); assert(!audio_format.IsDefined() || |