diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2019-09-29 10:00:23 -0600 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2019-10-02 18:04:40 -0600 |
commit | f470d3e856e7dee3c6003aeff0c98005822c5f90 (patch) | |
tree | 20b9f2d212195a2a7f04442e4365d6715e05e385 /libs/ardour/plugin.cc | |
parent | bc3b65834991b126843e85618c2f5d1d3c7e9389 (diff) |
remove all use of NO_PLUGIN_STATE #ifdef
We determined several years that we should never ever do this,
and changed the basis for the free/demo copy because of that.
Diffstat (limited to 'libs/ardour/plugin.cc')
-rw-r--r-- | libs/ardour/plugin.cc | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc index 970959cd85..4bb983ee82 100644 --- a/libs/ardour/plugin.cc +++ b/libs/ardour/plugin.cc @@ -80,11 +80,6 @@ using namespace PBD; namespace ARDOUR { class AudioEngine; } -#ifdef NO_PLUGIN_STATE -static bool seen_get_state_message = false; -static bool seen_set_state_message = false; -#endif - PBD::Signal2<void, std::string, Plugin*> Plugin::PresetsChanged; bool @@ -321,12 +316,11 @@ Plugin::possible_output () const const Plugin::PresetRecord * Plugin::preset_by_label (const string& label) { -#ifndef NO_PLUGIN_STATE if (!_have_presets) { find_presets (); _have_presets = true; } -#endif + // FIXME: O(n) for (map<string, PresetRecord>::const_iterator i = _presets.begin(); i != _presets.end(); ++i) { if (i->second.label == label) { @@ -340,12 +334,11 @@ Plugin::preset_by_label (const string& label) const Plugin::PresetRecord * Plugin::preset_by_uri (const string& uri) { -#ifndef NO_PLUGIN_STATE if (!_have_presets) { find_presets (); _have_presets = true; } -#endif + map<string, PresetRecord>::const_iterator pr = _presets.find (uri); if (pr != _presets.end()) { return &pr->second; @@ -425,7 +418,6 @@ Plugin::get_presets () { vector<PresetRecord> p; -#ifndef NO_PLUGIN_STATE if (!_have_presets) { find_presets (); _have_presets = true; @@ -434,14 +426,6 @@ Plugin::get_presets () for (map<string, PresetRecord>::const_iterator i = _presets.begin(); i != _presets.end(); ++i) { p.push_back (i->second); } -#else - if (!seen_set_state_message) { - info << string_compose (_("Plugin presets are not supported in this build of %1. Consider paying for a full version"), - PROGRAM_NAME) - << endmsg; - seen_set_state_message = true; - } -#endif return p; } @@ -511,16 +495,7 @@ Plugin::get_state () root->set_property (X_("last-preset-label"), _last_preset.label); root->set_property (X_("parameter-changed-since-last-preset"), _parameter_changed_since_last_preset); -#ifndef NO_PLUGIN_STATE add_state (root); -#else - if (!seen_get_state_message) { - info << string_compose (_("Saving plugin settings is not supported in this build of %1. Consider paying for the full version"), - PROGRAM_NAME) - << endmsg; - seen_get_state_message = true; - } -#endif return *root; } |