diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2024-03-26 12:23:51 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2024-03-26 12:23:51 +0100 |
commit | 6e461de50e73c0c957af73e5ee7a25f4d0293490 (patch) | |
tree | 03916b36c1cf0e25239b8d6cc0cf013b0fcb3697 /src/drumkitloader.cc | |
parent | 702e6907265035af031004f21ce09e3f62037fb4 (diff) |
Make all mutex locks const, as per linter warning
Diffstat (limited to 'src/drumkitloader.cc')
-rw-r--r-- | src/drumkitloader.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/drumkitloader.cc b/src/drumkitloader.cc index 9167201..d73efff 100644 --- a/src/drumkitloader.cc +++ b/src/drumkitloader.cc @@ -93,7 +93,7 @@ void DrumKitLoader::deinit() framesize_semaphore.post(); { - std::lock_guard<std::mutex> guard(mutex); + const std::lock_guard<std::mutex> guard(mutex); load_queue.clear(); } @@ -301,13 +301,13 @@ void DrumKitLoader::loadKitAudio(const DrumKit& kit) void DrumKitLoader::skip() { - std::lock_guard<std::mutex> guard(mutex); + const std::lock_guard<std::mutex> guard(mutex); load_queue.clear(); } void DrumKitLoader::setFrameSize(std::size_t framesize) { - std::lock_guard<std::mutex> guard(mutex); + const std::lock_guard<std::mutex> guard(mutex); this->framesize = framesize; framesize_semaphore.post(); // Signal that the framesize has been set. } @@ -324,7 +324,7 @@ void DrumKitLoader::thread_main() { std::size_t size; { - std::lock_guard<std::mutex> guard(mutex); + const std::lock_guard<std::mutex> guard(mutex); size = load_queue.size(); } @@ -367,7 +367,7 @@ void DrumKitLoader::thread_main() std::string filename; { - std::lock_guard<std::mutex> guard(mutex); + const std::lock_guard<std::mutex> guard(mutex); if(load_queue.size() == 0) { |