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/midimapper.cc | |
parent | 702e6907265035af031004f21ce09e3f62037fb4 (diff) |
Make all mutex locks const, as per linter warning
Diffstat (limited to 'src/midimapper.cc')
-rw-r--r-- | src/midimapper.cc | 4 |
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); |