From 4bd1e2e18430a5cf5c73f0575f56b614a9f00569 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 26 Jun 2021 01:53:55 +0200 Subject: [PATCH] NO-OP: consolidate code (VST ID by name) --- libs/ardour/plugin.cc | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc index 7c57c2a22d..b5f7f59284 100644 --- a/libs/ardour/plugin.cc +++ b/libs/ardour/plugin.cc @@ -258,15 +258,17 @@ ARDOUR::find_plugin(Session& session, string identifier, PluginType type) } } -#ifdef WINDOWS_VST_SUPPORT +#if defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT /* hmm, we didn't find it. could be because in older versions of Ardour. - we used to store the name of a VST plugin, not its unique ID. so try - again. - */ + * we used to store the name of a VST plugin, not its unique ID. so try + * again. + */ - for (i = plugs.begin(); i != plugs.end(); ++i) { - if (identifier == (*i)->name){ - return (*i)->load (session); + if (type == ARDOUR::LXVST || type == ARDOUR::Windows_VST) { + for (i = plugs.begin(); i != plugs.end(); ++i) { + if (identifier == (*i)->name){ + return (*i)->load (session); + } } } #endif @@ -283,15 +285,6 @@ ARDOUR::find_plugin(Session& session, string identifier, PluginType type) if (identifier == (*i)->unique_id){ return (*i)->load (session); } -#ifdef LXVST_SUPPORT - /* hmm, we didn't find it. could be because in older versions of Ardour. - we used to store the name of a VST plugin, not its unique ID. so try - again. - */ - - for (i = plugs.begin(); i != plugs.end(); ++i) { - if (identifier == (*i)->name){ - return (*i)->load (session); } }