From 01a75c04b1912856d60629250b80873199449811 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 5 Feb 2020 22:31:22 +0100 Subject: [PATCH] Fix rt-safety (const reference, not const copy) PluginInsert (and a few other places) iterate over channel mappings using a const iterator. However mappings() allocated memory since it was copied --- libs/ardour/ardour/chan_mapping.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ardour/ardour/chan_mapping.h b/libs/ardour/ardour/chan_mapping.h index 64ffc32890..07b623f8e1 100644 --- a/libs/ardour/ardour/chan_mapping.h +++ b/libs/ardour/ardour/chan_mapping.h @@ -106,8 +106,8 @@ public: typedef std::map TypeMapping; typedef std::map Mappings; - Mappings mappings() { return _mappings; } - const Mappings mappings() const { return _mappings; } + Mappings mappings() { return _mappings; } + const Mappings& mappings() const { return _mappings; } bool operator==(const ChanMapping& other) const { return (_mappings == other._mappings);