libs/ardour/wscript: unit tests get a target name, inorder to be able to build them...
[ardour.git] / libs / ardour / io.cc
index 2397999a26a676f5521a949303af1dbfef27dc92..0d7446e8523a2757bcbfb285a4a600eb5353d690 100644 (file)
@@ -260,7 +260,7 @@ IO::remove_port (Port* port, void* src)
                PortCountChanged (n_ports()); /* EMIT SIGNAL */
        }
 
-       if (change == ConfigurationChanged) {
+       if (change & ConfigurationChanged) {
                setup_bundles ();
        }
 
@@ -354,7 +354,7 @@ IO::disconnect (void* src)
 }
 
 bool
-IO::ensure_ports_locked (ChanCount count, bool clear, void* src)
+IO::ensure_ports_locked (ChanCount count, bool clear, void* /*src*/)
 {
        Port* port = 0;
        bool  changed    = false;
@@ -460,7 +460,7 @@ IO::get_state (void)
 }
 
 XMLNode&
-IO::state (bool full_state)
+IO::state (bool /*full_state*/)
 {
        XMLNode* node = new XMLNode (state_node_name);
        char buf[64];
@@ -1039,7 +1039,7 @@ IO::enable_connecting ()
 }
 
 void
-IO::bundle_changed (Bundle::Change c)
+IO::bundle_changed (Bundle::Change /*c*/)
 {
        //XXX
 //     connect_input_ports_to_bundle (_input_bundle, this);
@@ -1255,6 +1255,18 @@ IO::set_name_in_state (XMLNode& node, const string& new_name)
 bool
 IO::connected_to (boost::shared_ptr<const IO> other) const
 {
+       if (!other) {
+               /* do we have any connections at all? */
+
+               for (PortSet::const_iterator p = _ports.begin(); p != _ports.end(); ++p) {
+                       if (p->connected()) {
+                               return true;
+                       }
+               }
+
+               return false;
+       }
+
        assert (_direction != other->direction());
 
        uint32_t i, j;