diff options
author | David Robillard <d@drobilla.net> | 2019-03-08 20:02:15 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-03-09 00:43:43 +0100 |
commit | 2d76872a6c2d55df18c44ed39fc3a6cbfa3d2ea3 (patch) | |
tree | 27baa2bd40cca28dd271cf8f19e7cb8553fb5f73 | |
parent | 6708da936dda6b6aace21063acf50e1427548383 (diff) | |
download | ingen-2d76872a6c2d55df18c44ed39fc3a6cbfa3d2ea3.tar.gz ingen-2d76872a6c2d55df18c44ed39fc3a6cbfa3d2ea3.tar.bz2 ingen-2d76872a6c2d55df18c44ed39fc3a6cbfa3d2ea3.zip |
Make Tee preserve interface order and act as a facade for the first
-rw-r--r-- | ingen/Tee.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ingen/Tee.hpp b/ingen/Tee.hpp index cee8c59e..153a3d4b 100644 --- a/ingen/Tee.hpp +++ b/ingen/Tee.hpp @@ -23,8 +23,8 @@ #include <cstddef> #include <mutex> -#include <set> #include <utility> +#include <vector> namespace ingen { @@ -32,16 +32,16 @@ namespace ingen { class Tee : public Interface { public: - typedef std::set< SPtr<Interface> > Sinks; + typedef std::vector<SPtr<Interface>> Sinks; explicit Tee(Sinks sinks) : _sinks(std::move(sinks)) {} SPtr<Interface> respondee() const override { - return (*_sinks.begin())->respondee(); + return _sinks.front()->respondee(); } void set_respondee(SPtr<Interface> respondee) override { - (*_sinks.begin())->set_respondee(respondee); + _sinks.front()->set_respondee(respondee); } void message(const Message& message) override { |