diff options
author | Robin Gareus <robin@gareus.org> | 2015-12-25 16:20:53 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-12-25 17:12:37 +0100 |
commit | b92f208b521f0e733b123ef5e7552ee26b4d439d (patch) | |
tree | df241ca594caa904d43a407cb8ff6afb850480fb /libs/ardour/ardour | |
parent | a8159326b85a6c86ac7a0108b8c9468b7ff23502 (diff) |
don't assume plugin presets start their numbering at zero.
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/plugin.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/ardour/ardour/plugin.h b/libs/ardour/ardour/plugin.h index 008e88bf78..72eda4c2fd 100644 --- a/libs/ardour/ardour/plugin.h +++ b/libs/ardour/ardour/plugin.h @@ -144,17 +144,17 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public Latent void monitoring_changed (); struct PresetRecord { - PresetRecord () : number (-1), user (true) {} - PresetRecord (const std::string& u, const std::string& l, int n = -1, bool s = true) : uri (u), label (l), number (n), user (s) {} + PresetRecord () : valid (false) {} + PresetRecord (const std::string& u, const std::string& l, bool s = true) : uri (u), label (l), user (s), valid (true) {} bool operator!= (PresetRecord const & a) const { - return number != a.number || uri != a.uri || label != a.label; + return uri != a.uri || label != a.label; } std::string uri; std::string label; - int number; // if <0, invalid bool user; + bool valid; }; PresetRecord save_preset (std::string); @@ -335,8 +335,8 @@ struct PluginPreset { if (preset) { _preset.uri = preset->uri; _preset.label = preset->label; - _preset.number = preset->number; _preset.user = preset->user; + _preset.valid = preset->valid; } } }; |