From 08d80d0c2291b788c0914e56780f03a4dcab4214 Mon Sep 17 00:00:00 2001 From: Fabian Paus <fabian.paus@kit.edu> Date: Mon, 3 Jan 2022 15:22:20 +0100 Subject: [PATCH] ArViz: Next try to fix compile error --- .../RobotAPI/components/ArViz/Client/Client.h | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/source/RobotAPI/components/ArViz/Client/Client.h b/source/RobotAPI/components/ArViz/Client/Client.h index 9ba175fda..a2de4e49a 100644 --- a/source/RobotAPI/components/ArViz/Client/Client.h +++ b/source/RobotAPI/components/ArViz/Client/Client.h @@ -61,6 +61,11 @@ namespace viz viz::data::CommitInput data_; }; + struct InteractionFeedback + { + + }; + struct Client { Client() = default; @@ -103,14 +108,19 @@ namespace viz } template <typename ElementT> - void commitLayerContaining(std::string const& name, ElementT const& element = nullptr) + void commitLayerContaining(std::string const& name) + { + std::vector<viz::Layer> layers; + layers.push_back(this->layer(name)); + commit(layers); + } + + template <typename ElementT> + void commitLayerContaining(std::string const& name, ElementT const& element) { std::vector<viz::Layer> layers; viz::Layer& newLayer = layers.emplace_back(this->layer(name)); - if (element) - { - newLayer.add(element); - } + newLayer.add(element); commit(layers); } -- GitLab