From a5f1583da1764e2e5300314ba24c07c80580f479 Mon Sep 17 00:00:00 2001 From: Sascha Wirges Date: Mon, 22 Jun 2020 12:53:29 +0200 Subject: [PATCH] Fix parameter block naming --- .../simple_node_status.hpp | 8 ++++---- include/rosinterface_handler/utilities.hpp | 4 ++-- templates/Interface.h.template | 20 +++++++++---------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/rosinterface_handler/simple_node_status.hpp b/include/rosinterface_handler/simple_node_status.hpp index 9a54cec..a8ae34b 100644 --- a/include/rosinterface_handler/simple_node_status.hpp +++ b/include/rosinterface_handler/simple_node_status.hpp @@ -43,11 +43,11 @@ class SimpleNodeStatus { //! Lightweight way to set or report a new status. The status remains until overwritten by a new status. template - void set(NodeStatus s, const Arg& arg, const Args&... args) { + void set(NodeStatus s, const Arg& arg, const Args&... Args_) { bool modified = false; { std::lock_guard g{statusMutex_}; - Status newStatus{s, asString(arg, args...)}; + Status newStatus{s, asString(arg, Args_...)}; modified = status_ != newStatus; status_ = newStatus; } @@ -60,9 +60,9 @@ class SimpleNodeStatus { //! Add/overwrite extra information about the status in form of key/value pairs. The information will be shared //! along with the overall node status. It remains until explicitly cleared or overwritten. template - void info(const std::string& name, const Arg& arg, const Args&... args) { + void info(const std::string& name, const Arg& arg, const Args&... Args_) { std::lock_guard g{statusMutex_}; - extraInfo_[name] = asString(arg, args...); + extraInfo_[name] = asString(arg, Args_...); } //! Clears previously set information. Returns true on success. diff --git a/include/rosinterface_handler/utilities.hpp b/include/rosinterface_handler/utilities.hpp index 4a40083..2228cb5 100644 --- a/include/rosinterface_handler/utilities.hpp +++ b/include/rosinterface_handler/utilities.hpp @@ -309,10 +309,10 @@ inline void testMax(const std::string key, std::map& val, T max = std::num /// \param args Additional arguments (optional) /// \return template -inline std::string asString(Arg&& arg, Args&&... args) { +inline std::string asString(Arg&& arg, Args&&... Args_) { std::ostringstream oss; oss << std::forward(arg); - (oss << ... << std::forward(args)); + (oss << ... << std::forward(Args_)); return oss.str(); } diff --git a/templates/Interface.h.template b/templates/Interface.h.template index 868b36a..7639bb1 100644 --- a/templates/Interface.h.template +++ b/templates/Interface.h.template @@ -122,36 +122,36 @@ $string_representation; /// \brief logs to the debug output. Works also within nodelets. // NOLINTNEXTLINE(readability-function-size) template - inline void logDebug(const Msg& msg, const Msgs&... msgs) const { - ROS_DEBUG_STREAM_NAMED(nodeNameWithNamespace(), rosinterface_handler::asString(msg, msgs...)); + inline void logDebug(const Msg& msg, const Msgs&... Msgs_) const { + ROS_DEBUG_STREAM_NAMED(nodeNameWithNamespace(), rosinterface_handler::asString(msg, Msgs_...)); } /// \brief logs to the debug output. Works also within nodelets. Output is throttled. // NOLINTNEXTLINE(readability-function-size) template - inline void logInfo(const Msg& msg, const Msgs&... msgs) const { - ROS_INFO_STREAM_THROTTLE_NAMED(5, nodeNameWithNamespace(), rosinterface_handler::asString(msg, msgs...)); + inline void logInfo(const Msg& msg, const Msgs&... Msgs_) const { + ROS_INFO_STREAM_THROTTLE_NAMED(5, nodeNameWithNamespace(), rosinterface_handler::asString(msg, Msgs_...)); } /// \brief logs to the debug output. Works also within nodelets. Output is throttled. // NOLINTNEXTLINE(readability-function-size) template - inline void logWarn(const Msg& msg, const Msgs&... msgs) const { - ROS_WARN_STREAM_THROTTLE_NAMED(5, nodeNameWithNamespace(), rosinterface_handler::asString(msg, msgs...)); + inline void logWarn(const Msg& msg, const Msgs&... Msgs_) const { + ROS_WARN_STREAM_THROTTLE_NAMED(5, nodeNameWithNamespace(), rosinterface_handler::asString(msg, Msgs_...)); } /// \brief logs to the error output. Works also within nodelets. Output is throttled. // NOLINTNEXTLINE(readability-function-size) template - inline void logError(const Msg& msg, const Msgs&... msgs) const { - ROS_ERROR_STREAM_THROTTLE_NAMED(5, nodeNameWithNamespace(), rosinterface_handler::asString(msg, msgs...)); + inline void logError(const Msg& msg, const Msgs&... Msgs_) const { + ROS_ERROR_STREAM_THROTTLE_NAMED(5, nodeNameWithNamespace(), rosinterface_handler::asString(msg, Msgs_...)); } /// \brief logs to the error output. Works also within nodelets. Not throttled! Dont call this in loops! // NOLINTNEXTLINE(readability-function-size) template - inline void logErrorDirect(const Msg& msg, const Msgs&... msgs) const { - ROS_ERROR_STREAM_NAMED(nodeNameWithNamespace(), rosinterface_handler::asString(msg, msgs...)); + inline void logErrorDirect(const Msg& msg, const Msgs&... Msgs_) const { + ROS_ERROR_STREAM_NAMED(nodeNameWithNamespace(), rosinterface_handler::asString(msg, Msgs_...)); } /// \brief logs subscribed and advertised topics to the command line. Works also within nodelets.