diff options
author | David Robillard <d@drobilla.net> | 2017-03-19 10:36:11 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-03-20 02:58:56 +0100 |
commit | efc0fe0a973db706d9409b345ad6fae585f4388c (patch) | |
tree | 6348b6bd17e358ed328b5c443966436fb36521e5 /src/server/ArcImpl.cpp | |
parent | f46a3ec40a691a6892ad5536ca47de175a9c05b7 (diff) | |
download | ingen-efc0fe0a973db706d9409b345ad6fae585f4388c.tar.gz ingen-efc0fe0a973db706d9409b345ad6fae585f4388c.tar.bz2 ingen-efc0fe0a973db706d9409b345ad6fae585f4388c.zip |
Improve arc list efficiency
Diffstat (limited to 'src/server/ArcImpl.cpp')
-rw-r--r-- | src/server/ArcImpl.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/server/ArcImpl.cpp b/src/server/ArcImpl.cpp index 1dd92d48..406d2010 100644 --- a/src/server/ArcImpl.cpp +++ b/src/server/ArcImpl.cpp @@ -42,6 +42,16 @@ ArcImpl::ArcImpl(PortImpl* tail, PortImpl* head) assert(tail->path() != head->path()); } +ArcImpl::~ArcImpl() +{ + if (is_linked()) { + InputPort* iport = dynamic_cast<InputPort*>(_head); + if (iport) { + iport->remove_arc(*this); + } + } +} + const Raul::Path& ArcImpl::tail_path() const { |