From 07f62aa72f15767fa51d66957d96c2278fc062b8 Mon Sep 17 00:00:00 2001 From: v4hn Date: Sat, 21 Mar 2020 12:49:57 +0100 Subject: [PATCH] add override in Task I very much considered just removing the protected inheritance again, but it would add unnecessary code duplication. Take note, the overriding `insert` function bypasses the Wrapper and directly forwards to the wrapped container. This is somewhat dirty and could be an issue for anyone inheriting from `Task`. --- core/include/moveit/task_constructor/task.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/include/moveit/task_constructor/task.h b/core/include/moveit/task_constructor/task.h index 0aea89c2..7a3950e8 100644 --- a/core/include/moveit/task_constructor/task.h +++ b/core/include/moveit/task_constructor/task.h @@ -82,7 +82,7 @@ public: ContainerBase::pointer&& container = std::make_unique("task pipeline")); Task(Task&& other); Task& operator=(Task&& other); - ~Task(); + ~Task() override; const std::string& id() const; @@ -93,7 +93,7 @@ public: void loadRobotModel(const std::string& robot_description = "robot_description"); void add(Stage::pointer&& stage); - bool insert(Stage::pointer&& stage, int before = -1); + bool insert(Stage::pointer&& stage, int before = -1) override; void clear() final; /// enable introspection publishing for use with rviz