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/midimapper.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/midimapper.cc') diff --git a/src/midimapper.cc b/src/midimapper.cc index b9316c5..345ce2f 100644 --- a/src/midimapper.cc +++ b/src/midimapper.cc @@ -30,7 +30,7 @@ std::vector MidiMapper::lookup(int note_id) { std::vector instruments; - std::lock_guard guard(mutex); + const std::lock_guard guard(mutex); for(const auto& map_entry : midimap) { @@ -49,7 +49,7 @@ std::vector MidiMapper::lookup(int note_id) void MidiMapper::swap(instrmap_t& instrmap, midimap_t& midimap) { - std::lock_guard guard(mutex); + const std::lock_guard guard(mutex); std::swap(this->instrmap, instrmap); std::swap(this->midimap, midimap); -- cgit v1.2.3