diff options
author | David Robillard <d@drobilla.net> | 2009-02-19 01:24:34 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-02-19 01:24:34 +0000 |
commit | 067faeca624577faa20718eb1bc4ef40fb768c2a (patch) | |
tree | 654d9def4b39c670fae2061b331c6fb2b43a0892 /libs/ardour/session_command.cc | |
parent | 6b8c6128cbd20b40f925d37c0c92962fb9b4bd5b (diff) |
Remove unused Session::curves.
git-svn-id: svn://localhost/ardour2/branches/3.0@4633 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_command.cc')
-rw-r--r-- | libs/ardour/session_command.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/ardour/session_command.cc b/libs/ardour/session_command.cc index bda3475a30..bb51d51c43 100644 --- a/libs/ardour/session_command.cc +++ b/libs/ardour/session_command.cc @@ -74,8 +74,7 @@ Session::memento_command_factory(XMLNode *n) child = before; } - if (!child) - { + if (!child) { error << _("Tried to reconstitute a MementoCommand with no contents, failing. id=") << id.to_s() << endmsg; return 0; } @@ -105,8 +104,10 @@ Session::memento_command_factory(XMLNode *n) } else if (obj_T == typeid (Route).name() || obj_T == typeid (AudioTrack).name() || obj_T == typeid(MidiTrack).name()) { return new MementoCommand<Route>(*route_by_id(id), before, after); } else if (obj_T == typeid (Evoral::Curve).name() || obj_T == typeid (AutomationList).name()) { - if (automation_lists.count(id)) - return new MementoCommand<AutomationList>(*automation_lists[id], before, after); + std::map<PBD::ID, AutomationList*>::iterator i = automation_lists.find(id); + if (i != automation_lists.end()) { + return new MementoCommand<AutomationList>(*i->second, before, after); + } } else if (registry.count(id)) { // For Editor and AutomationLine which are off-limits here return new MementoCommand<PBD::StatefulThingWithGoingAway>(*registry[id], before, after); } |