diff options
author | David Robillard <d@drobilla.net> | 2017-12-17 23:46:20 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-01-12 18:20:04 +0100 |
commit | 967a8b9d6690a5ece385d07af04c322d645de23f (patch) | |
tree | ade394d2a4b23c0007b58b6ab86d2427711f8bf5 /src/server/DuplexPort.cpp | |
parent | 79fe75853ed8205674335f88e4e9c0e9dec137f9 (diff) | |
download | ingen-967a8b9d6690a5ece385d07af04c322d645de23f.tar.gz ingen-967a8b9d6690a5ece385d07af04c322d645de23f.tar.bz2 ingen-967a8b9d6690a5ece385d07af04c322d645de23f.zip |
Reduce port memory overhead
Diffstat (limited to 'src/server/DuplexPort.cpp')
-rw-r--r-- | src/server/DuplexPort.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/DuplexPort.cpp b/src/server/DuplexPort.cpp index 2823da05..7279dfb3 100644 --- a/src/server/DuplexPort.cpp +++ b/src/server/DuplexPort.cpp @@ -100,15 +100,15 @@ DuplexPort::inherit_neighbour(const PortImpl* port, /* TODO: This needs to become more sophisticated, and correct the situation if the port is disconnected. */ if (_type == PortType::CONTROL || _type == PortType::CV) { - if (port->minimum().get<float>() < _min.get<float>()) { + if (port->minimum() < _min) { _min = port->minimum(); remove.emplace(uris.lv2_minimum, uris.patch_wildcard); - add.emplace(uris.lv2_minimum, port->minimum()); + add.emplace(uris.lv2_minimum, _bufs.forge().make(port->minimum())); } - if (port->maximum().get<float>() > _max.get<float>()) { + if (port->maximum() > _max) { _max = port->maximum(); remove.emplace(uris.lv2_maximum, uris.patch_wildcard); - add.emplace(uris.lv2_maximum, port->maximum()); + add.emplace(uris.lv2_maximum, _bufs.forge().make(port->maximum())); } } else if (_type == PortType::ATOM) { for (auto i = port->properties().find(uris.atom_supports); |