|
| 1 | +From 5dcedba918b856c01a129408bfdce6c1a62a8111 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Guilhem Saurel <guilhem.saurel@laas.fr> |
| 3 | +Date: Thu, 26 Nov 2020 16:40:30 +0100 |
| 4 | +Subject: [PATCH] fix shadowing of Entity::name |
| 5 | + |
| 6 | +To fix build with -Werror=shadow |
| 7 | +--- |
| 8 | + src/ros_tf_listener.hh | 4 ++-- |
| 9 | + src/ros_time.cpp | 4 ++-- |
| 10 | + 2 files changed, 4 insertions(+), 4 deletions(-) |
| 11 | + |
| 12 | +diff --git a/src/ros_tf_listener.hh b/src/ros_tf_listener.hh |
| 13 | +index c046bee..a95907a 100644 |
| 14 | +--- src/ros_tf_listener.hh |
| 15 | ++++ src/ros_tf_listener.hh |
| 16 | +@@ -68,8 +68,8 @@ class RosTfListener : public Entity { |
| 17 | + public: |
| 18 | + typedef internal::TransformListenerData TransformListenerData; |
| 19 | + |
| 20 | +- RosTfListener(const std::string& name) |
| 21 | +- : Entity(name) |
| 22 | ++ RosTfListener(const std::string& _name) |
| 23 | ++ : Entity(_name) |
| 24 | + , buffer() |
| 25 | + , listener(buffer, rosInit(), false) |
| 26 | + { |
| 27 | +diff --git a/src/ros_time.cpp b/src/ros_time.cpp |
| 28 | +index 52c8f76..7233ad3 100644 |
| 29 | +--- src/ros_time.cpp |
| 30 | ++++ src/ros_time.cpp |
| 31 | +@@ -22,8 +22,8 @@ const std::string RosTime::docstring_( |
| 32 | + " Signal \"time\" provides time as given by ros::time as\n" |
| 33 | + " boost::posix_time::ptime type.\n"); |
| 34 | + |
| 35 | +-RosTime::RosTime(const std::string& name) |
| 36 | +- : Entity(name), now_("RosTime(" + name + ")::output(boost::posix_time::ptime)::time") { |
| 37 | ++RosTime::RosTime(const std::string& _name) |
| 38 | ++ : Entity(_name), now_("RosTime(" + _name + ")::output(boost::posix_time::ptime)::time") { |
| 39 | + signalRegistration(now_); |
| 40 | + now_.setConstant(rosTimeToPtime(ros::Time::now())); |
| 41 | + now_.setFunction(boost::bind(&RosTime::update, this, _1, _2)); |
0 commit comments