From 98fd84d040ed6d36aba69218192373b5e75c2bc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Malte=20J=C3=BCrgens?= Date: Mon, 18 Jul 2022 20:28:43 +0200 Subject: [PATCH] virtmic: remember node_info instead of node --- src/virtmic.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/virtmic.cpp b/src/virtmic.cpp index f1d1881..f46fae7 100644 --- a/src/virtmic.cpp +++ b/src/virtmic.cpp @@ -33,7 +33,7 @@ void start(QString _target) { std::map ports; std::unique_ptr virt_fl, virt_fr; - std::map nodes; + std::map nodes; std::map links; auto main_loop = pipewire::main_loop(); @@ -62,7 +62,7 @@ void start(QString _target) { auto &parent = nodes.at(parent_id); - if (parent.info().props["node.name"].find(target) != std::string::npos) { + if (parent.props["node.name"].find(target) != std::string::npos) { std::cout << "[virtmic] " << "Link : " << target << ":" << port_id << " -> "; @@ -100,7 +100,7 @@ void start(QString _target) { << std::endl; if (!nodes.count(global.id)) { - nodes.emplace(global.id, std::move(node)); + nodes.emplace(global.id, node.info()); link(target, core); } } @@ -130,7 +130,7 @@ void start(QString _target) { reg_events.on( [&](const std::uint32_t id) { if (nodes.count(id)) { - auto info = nodes.at(id).info(); + auto info = nodes.at(id); std::cout << "[virtmic] " << "Removed: " << info.props["node.name"] << std::endl; nodes.erase(id);