From 5dcedba918b856c01a129408bfdce6c1a62a8111 Mon Sep 17 00:00:00 2001
From: Guilhem Saurel <guilhem.saurel@laas.fr>
Date: Thu, 26 Nov 2020 16:40:30 +0100
Subject: [PATCH] fix shadowing of Entity::name

To fix build with -Werror=shadow
---
 src/ros_tf_listener.hh | 4 ++--
 src/ros_time.cpp       | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/ros_tf_listener.hh b/src/ros_tf_listener.hh
index c046bee..a95907a 100644
--- a/src/ros_tf_listener.hh
+++ b/src/ros_tf_listener.hh
@@ -68,8 +68,8 @@ class RosTfListener : public Entity {
  public:
   typedef internal::TransformListenerData TransformListenerData;
 
-  RosTfListener(const std::string& name)
-    : Entity(name)
+  RosTfListener(const std::string& _name)
+    : Entity(_name)
     , buffer()
     , listener(buffer, rosInit(), false)
   {
diff --git a/src/ros_time.cpp b/src/ros_time.cpp
index 52c8f76..7233ad3 100644
--- a/src/ros_time.cpp
+++ b/src/ros_time.cpp
@@ -22,8 +22,8 @@ const std::string RosTime::docstring_(
     "  Signal \"time\" provides time as given by ros::time as\n"
     "  boost::posix_time::ptime type.\n");
 
-RosTime::RosTime(const std::string& name)
-    : Entity(name), now_("RosTime(" + name + ")::output(boost::posix_time::ptime)::time") {
+RosTime::RosTime(const std::string& _name)
+    : Entity(_name), now_("RosTime(" + _name + ")::output(boost::posix_time::ptime)::time") {
   signalRegistration(now_);
   now_.setConstant(rosTimeToPtime(ros::Time::now()));
   now_.setFunction(boost::bind(&RosTime::update, this, _1, _2));
-- 
GitLab