diff options
Diffstat (limited to 'src/server/Broadcaster.hpp')
-rw-r--r-- | src/server/Broadcaster.hpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/server/Broadcaster.hpp b/src/server/Broadcaster.hpp index 8e9848f4..9bae44b1 100644 --- a/src/server/Broadcaster.hpp +++ b/src/server/Broadcaster.hpp @@ -29,8 +29,7 @@ #include <mutex> #include <set> -namespace ingen { -namespace server { +namespace ingen::server { /** Broadcaster for all clients. * @@ -76,7 +75,8 @@ public: * This makes doing the right thing in recursive functions that send * updates simple (e.g. Event::post_process()). */ - class Transfer : public raul::Noncopyable { + class Transfer : public raul::Noncopyable + { public: explicit Transfer(Broadcaster& b) : broadcaster(b) { if (++broadcaster._bundle_depth == 1) { @@ -97,7 +97,7 @@ public: send_plugins_to(Interface*, const BlockFactory::Plugins& plugins); void message(const Message& msg) override { - std::lock_guard<std::mutex> lock(_clients_mutex); + const std::lock_guard<std::mutex> lock{_clients_mutex}; for (const auto& c : _clients) { if (c != _ignore_client) { c->message(msg); @@ -120,7 +120,6 @@ private: std::shared_ptr<Interface> _ignore_client; }; -} // namespace server -} // namespace ingen +} // namespace ingen::server #endif // INGEN_ENGINE_BROADCASTER_HPP |