summaryrefslogtreecommitdiff
path: root/src/midimapper.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2024-03-26 12:23:51 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2024-03-26 12:23:51 +0100
commit6e461de50e73c0c957af73e5ee7a25f4d0293490 (patch)
tree03916b36c1cf0e25239b8d6cc0cf013b0fcb3697 /src/midimapper.cc
parent702e6907265035af031004f21ce09e3f62037fb4 (diff)
Make all mutex locks const, as per linter warning
Diffstat (limited to 'src/midimapper.cc')
-rw-r--r--src/midimapper.cc4
1 files changed, 2 insertions, 2 deletions
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<int> MidiMapper::lookup(int note_id)
{
std::vector<int> instruments;
- std::lock_guard<std::mutex> guard(mutex);
+ const std::lock_guard<std::mutex> guard(mutex);
for(const auto& map_entry : midimap)
{
@@ -49,7 +49,7 @@ std::vector<int> MidiMapper::lookup(int note_id)
void MidiMapper::swap(instrmap_t& instrmap, midimap_t& midimap)
{
- std::lock_guard<std::mutex> guard(mutex);
+ const std::lock_guard<std::mutex> guard(mutex);
std::swap(this->instrmap, instrmap);
std::swap(this->midimap, midimap);