From 6e461de50e73c0c957af73e5ee7a25f4d0293490 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 26 Mar 2024 12:23:51 +0100 Subject: Make all mutex locks const, as per linter warning --- src/drumkitloader.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/drumkitloader.cc') 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 guard(mutex); + const std::lock_guard guard(mutex); load_queue.clear(); } @@ -301,13 +301,13 @@ void DrumKitLoader::loadKitAudio(const DrumKit& kit) void DrumKitLoader::skip() { - std::lock_guard guard(mutex); + const std::lock_guard guard(mutex); load_queue.clear(); } void DrumKitLoader::setFrameSize(std::size_t framesize) { - std::lock_guard guard(mutex); + const std::lock_guard 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 guard(mutex); + const std::lock_guard guard(mutex); size = load_queue.size(); } @@ -367,7 +367,7 @@ void DrumKitLoader::thread_main() std::string filename; { - std::lock_guard guard(mutex); + const std::lock_guard guard(mutex); if(load_queue.size() == 0) { -- cgit v1.2.3