mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
minor code-tidying tweak - continue if port handle is null, rather than nest inside conditional
This commit is contained in:
parent
4ab80e16e9
commit
7df9917a11
1 changed files with 29 additions and 21 deletions
|
|
@ -543,7 +543,9 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
|
||||||
we excluded them earlier.
|
we excluded them earlier.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
string lp = p, monitor = _("Monitor");
|
string lp = p;
|
||||||
|
string monitor = _("Monitor");
|
||||||
|
|
||||||
boost::to_lower (lp);
|
boost::to_lower (lp);
|
||||||
boost::to_lower (monitor);
|
boost::to_lower (monitor);
|
||||||
|
|
||||||
|
|
@ -560,13 +562,20 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PortEngine::PortHandle ph = AudioEngine::instance()->port_engine().get_port_by_name (p);
|
PortEngine::PortHandle ph = AudioEngine::instance()->port_engine().get_port_by_name (p);
|
||||||
if (ph) {
|
|
||||||
|
if (!ph) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
DataType t (AudioEngine::instance()->port_engine().port_data_type (ph));
|
DataType t (AudioEngine::instance()->port_engine().port_data_type (ph));
|
||||||
|
|
||||||
if (t != DataType::NIL) {
|
if (t != DataType::NIL) {
|
||||||
|
|
||||||
if (port_has_prefix (p, X_("system:")) ||
|
if (port_has_prefix (p, X_("system:")) ||
|
||||||
port_has_prefix (p, X_("alsa_pcm:")) ||
|
port_has_prefix (p, X_("alsa_pcm:")) ||
|
||||||
port_has_prefix (p, X_("alsa_midi:"))) {
|
port_has_prefix (p, X_("alsa_midi:"))) {
|
||||||
extra_system[t].push_back (p);
|
extra_system[t].push_back (p);
|
||||||
|
|
||||||
} else if (port_has_prefix (p, lpnc)) {
|
} else if (port_has_prefix (p, lpnc)) {
|
||||||
|
|
||||||
/* we own this port (named after the program) */
|
/* we own this port (named after the program) */
|
||||||
|
|
@ -585,7 +594,6 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
++s;
|
++s;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue