From 0889588ae400d4a64ed6eab3cbddb6aa2a2c3c7c Mon Sep 17 00:00:00 2001 From: reuk Date: Sun, 5 Feb 2023 19:29:36 +0000 Subject: [PATCH] VST3: Avoid copy in channel mapper --- modules/juce_audio_processors/format_types/juce_VST3Common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/juce_audio_processors/format_types/juce_VST3Common.h b/modules/juce_audio_processors/format_types/juce_VST3Common.h index fae1f06a46..18c89a744c 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3Common.h +++ b/modules/juce_audio_processors/format_types/juce_VST3Common.h @@ -701,7 +701,7 @@ public: if (! validateLayouts (data.inputs, data.inputs + vstInputs, inputMap)) return getBlankBuffer (usedChannels, (int) data.numSamples); - setUpInputChannels (data, (size_t) vstInputs, scratchBuffer, inputMap, channels); + setUpInputChannels (data, (size_t) vstInputs, scratchBuffer, inputMap, channels); setUpOutputChannels (scratchBuffer, outputMap, channels); const auto channelPtr = channels.empty() ? scratchBuffer.getArrayOfWritePointers() @@ -719,7 +719,7 @@ private: { for (size_t busIndex = 0; busIndex < map.size(); ++busIndex) { - const auto mapping = map[busIndex]; + const auto& mapping = map[busIndex]; if (! mapping.isClientActive()) continue;