diff options
author | David Robillard <d@drobilla.net> | 2021-01-02 14:02:44 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-01-02 14:02:44 +0100 |
commit | 663a5d01b1931b97370ed8feff3ae229a9cc7ea4 (patch) | |
tree | aba74794cb45f06734bd80bbf53d79f947008e54 /src/Connector.cpp | |
parent | 1936aace80b5594078d874e9b661a9a91e461279 (diff) | |
download | patchage-663a5d01b1931b97370ed8feff3ae229a9cc7ea4.tar.gz patchage-663a5d01b1931b97370ed8feff3ae229a9cc7ea4.tar.bz2 patchage-663a5d01b1931b97370ed8feff3ae229a9cc7ea4.zip |
Format all code with clang-format
Diffstat (limited to 'src/Connector.cpp')
-rw-r--r-- | src/Connector.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/Connector.cpp b/src/Connector.cpp index 8226f91..fe008ce 100644 --- a/src/Connector.cpp +++ b/src/Connector.cpp @@ -26,47 +26,47 @@ namespace patchage { Connector::Connector(ILog& log) - : _log(log) + : _log(log) {} void Connector::add_driver(PortID::Type type, Driver* driver) { - _drivers.emplace(type, driver); + _drivers.emplace(type, driver); } void Connector::connect(const PortID& tail, const PortID& head) { - if (tail.type() != head.type()) { - _log.warning("Unable to connect incompatible port types"); - return; - } + if (tail.type() != head.type()) { + _log.warning("Unable to connect incompatible port types"); + return; + } - auto d = _drivers.find(tail.type()); - if (d == _drivers.end()) { - _log.error("No driver for port type"); - return; - } + auto d = _drivers.find(tail.type()); + if (d == _drivers.end()) { + _log.error("No driver for port type"); + return; + } - d->second->connect(tail, head); + d->second->connect(tail, head); } void Connector::disconnect(const PortID& tail, const PortID& head) { - if (tail.type() != head.type()) { - _log.error("Unable to disconnect incompatible port types"); - return; - } + if (tail.type() != head.type()) { + _log.error("Unable to disconnect incompatible port types"); + return; + } - auto d = _drivers.find(tail.type()); - if (d == _drivers.end()) { - _log.error("No driver for port type"); - return; - } + auto d = _drivers.find(tail.type()); + if (d == _drivers.end()) { + _log.error("No driver for port type"); + return; + } - d->second->disconnect(tail, head); + d->second->disconnect(tail, head); } } // namespace patchage |