diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-08-25 01:07:15 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-08-25 01:07:15 +0000 |
commit | ce234f363e95c38fc92728e520bf5ba240a89aa7 (patch) | |
tree | 96ce8c4734bdd564ec1f2ad0c36bc32f0b108204 /libs/ardour/session_command.cc | |
parent | 7e95f29ce95edf01d6d451f96fae03f3d3451ff8 (diff) |
use shared_ptr<> for all region handling
git-svn-id: svn://localhost/ardour2/trunk@852 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_command.cc')
-rw-r--r-- | libs/ardour/session_command.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libs/ardour/session_command.cc b/libs/ardour/session_command.cc index dbe0ffccdd..b54e5c8398 100644 --- a/libs/ardour/session_command.cc +++ b/libs/ardour/session_command.cc @@ -13,9 +13,7 @@ using namespace PBD; namespace ARDOUR { -static map<PBD::ID, Stateful*> registry; - -void Session::register_with_memento_command_factory(PBD::ID id, Stateful *ptr) +void Session::register_with_memento_command_factory(PBD::ID id, StatefulDestructible *ptr) { registry[id] = ptr; } @@ -90,7 +88,8 @@ Command *Session::memento_command_factory(XMLNode *n) } // For Editor and AutomationLine which are off-limits here else if (registry.count(id)) - return new MementoCommand<Stateful>(*registry[id], before, after); + return new MementoCommand<StatefulDestructible>(*registry[id], before, after); + /* we failed */ error << _("could not reconstitute MementoCommand from XMLNode. id=") << id.to_s() << endmsg; |