summaryrefslogtreecommitdiff
path: root/libs/ardour/io.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-05-14 17:18:48 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-05-14 17:18:48 +0000
commit1e0fd01815473b9d20d3144d437e2f7a8a9e680e (patch)
tree9895ef3fa90c68e34b6f68f18aacc104bd69d9d3 /libs/ardour/io.cc
parent37969d837e16c8fbac0821074495b5ebc2297d94 (diff)
drop boost::signals2 and replace with carl's solution which continues to rely on boost::function and boost::bind but alters two important semantics of signals2: (1) when a Connection object is disconnected, the slot ("functor") associated with the connection is destroyed immediately, unlike signals2 where this is deferred to a subsequent connect/emit call on the signal (2) if one functor called by the signal disconnects another Connection, the functor represented by the Connection will NOT be called during the current signal emission (signals2 copies the slot list at the start of emission and calls everything in the slot list). this change fixes some very nasty crashes apparently caused by boost::signals2 assuming that the memory referenced by a functor remains valid after a disconnect (google will show other developers who had issues with this).
git-svn-id: svn://localhost/ardour2/branches/3.0@12265 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/io.cc')
-rw-r--r--libs/ardour/io.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc
index a278852e77..26432c66ef 100644
--- a/libs/ardour/io.cc
+++ b/libs/ardour/io.cc
@@ -256,8 +256,8 @@ IO::remove_port (boost::shared_ptr<Port> port, void* src)
ChanCount after = before;
after.set (port->type(), after.get (port->type()) - 1);
- bool const r = PortCountChanging (after); /* EMIT SIGNAL */
- if (r) {
+ boost::optional<bool> const r = PortCountChanging (after); /* EMIT SIGNAL */
+ if (r.get_value_or (false)) {
return -1;
}