From a0649de6f77067537d61ff39b97c6d1ef18d32ff Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Thu, 5 Jul 2018 19:14:41 -0700 Subject: [PATCH 1/4] fix indentation to comply with uncrusity 0.67 --- rclcpp/include/rclcpp/function_traits.hpp | 6 +++--- rclcpp/include/rclcpp/intra_process_manager.hpp | 2 +- rclcpp/src/rclcpp/time_source.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rclcpp/include/rclcpp/function_traits.hpp b/rclcpp/include/rclcpp/function_traits.hpp index 39b2a712ba..1dcdb09bb9 100644 --- a/rclcpp/include/rclcpp/function_traits.hpp +++ b/rclcpp/include/rclcpp/function_traits.hpp @@ -130,20 +130,20 @@ struct function_traits: function_traits */ template struct arity_comparator : std::integral_constant< - bool, (Arity == function_traits::arity)>{}; + bool, (Arity == function_traits::arity)> {}; template struct check_arguments : std::is_same< typename function_traits::arguments, std::tuple - > +> {}; template struct same_arguments : std::is_same< typename function_traits::arguments, typename function_traits::arguments - > +> {}; } // namespace function_traits diff --git a/rclcpp/include/rclcpp/intra_process_manager.hpp b/rclcpp/include/rclcpp/intra_process_manager.hpp index 4eed5c35fc..356512c647 100644 --- a/rclcpp/include/rclcpp/intra_process_manager.hpp +++ b/rclcpp/include/rclcpp/intra_process_manager.hpp @@ -326,7 +326,7 @@ class IntraProcessManager message_sequence_number, requesting_subscriptions_intra_process_id, target_subs_size - ); + ); typename TypedMRB::SharedPtr typed_buffer = std::static_pointer_cast(buffer); if (!typed_buffer) { return; diff --git a/rclcpp/src/rclcpp/time_source.cpp b/rclcpp/src/rclcpp/time_source.cpp index b18b56c73b..50714f3b0f 100644 --- a/rclcpp/src/rclcpp/time_source.cpp +++ b/rclcpp/src/rclcpp/time_source.cpp @@ -92,7 +92,7 @@ void TimeSource::attachNode( node_topics_, node_graph_, node_services_ - ); + ); parameter_subscription_ = parameter_client_->on_parameter_event(std::bind(&TimeSource::on_parameter_event, this, std::placeholders::_1)); From f303e93aa02abb32e83c38bda28151bd3e0e852e Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Thu, 5 Jul 2018 19:15:42 -0700 Subject: [PATCH 2/4] fix spacing before opening brackets --- rclcpp/include/rclcpp/any_service_callback.hpp | 4 ++-- rclcpp/include/rclcpp/any_subscription_callback.hpp | 12 ++++++------ rclcpp/include/rclcpp/client.hpp | 4 ++-- rclcpp/include/rclcpp/service.hpp | 4 ++-- rclcpp/include/rclcpp/subscription.hpp | 4 ++-- rclcpp/include/rclcpp/subscription_factory.hpp | 2 +- rclcpp/include/rclcpp/timer.hpp | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/rclcpp/include/rclcpp/any_service_callback.hpp b/rclcpp/include/rclcpp/any_service_callback.hpp index b90bd121c8..24d1e9f6ce 100644 --- a/rclcpp/include/rclcpp/any_service_callback.hpp +++ b/rclcpp/include/rclcpp/any_service_callback.hpp @@ -32,12 +32,12 @@ class AnyServiceCallback { private: using SharedPtrCallback = std::function< - void( + void ( const std::shared_ptr, std::shared_ptr )>; using SharedPtrWithRequestHeaderCallback = std::function< - void( + void ( const std::shared_ptr, const std::shared_ptr, std::shared_ptr diff --git a/rclcpp/include/rclcpp/any_subscription_callback.hpp b/rclcpp/include/rclcpp/any_subscription_callback.hpp index ccbbb9c98f..095f3b9dc2 100644 --- a/rclcpp/include/rclcpp/any_subscription_callback.hpp +++ b/rclcpp/include/rclcpp/any_subscription_callback.hpp @@ -38,15 +38,15 @@ class AnySubscriptionCallback using MessageDeleter = allocator::Deleter; using MessageUniquePtr = std::unique_ptr; - using SharedPtrCallback = std::function)>; + using SharedPtrCallback = std::function)>; using SharedPtrWithInfoCallback = - std::function, const rmw_message_info_t &)>; - using ConstSharedPtrCallback = std::function)>; + std::function, const rmw_message_info_t &)>; + using ConstSharedPtrCallback = std::function)>; using ConstSharedPtrWithInfoCallback = - std::function, const rmw_message_info_t &)>; - using UniquePtrCallback = std::function; + std::function, const rmw_message_info_t &)>; + using UniquePtrCallback = std::function; using UniquePtrWithInfoCallback = - std::function; + std::function; SharedPtrCallback shared_ptr_callback_; SharedPtrWithInfoCallback shared_ptr_with_info_callback_; diff --git a/rclcpp/include/rclcpp/client.hpp b/rclcpp/include/rclcpp/client.hpp index da07517e0a..6781eaa9c5 100644 --- a/rclcpp/include/rclcpp/client.hpp +++ b/rclcpp/include/rclcpp/client.hpp @@ -130,8 +130,8 @@ class Client : public ClientBase using SharedFuture = std::shared_future; using SharedFutureWithRequest = std::shared_future>; - using CallbackType = std::function; - using CallbackWithRequestType = std::function; + using CallbackType = std::function; + using CallbackWithRequestType = std::function; RCLCPP_SMART_PTR_DEFINITIONS(Client) diff --git a/rclcpp/include/rclcpp/service.hpp b/rclcpp/include/rclcpp/service.hpp index 1cf9c55304..13ddb2d088 100644 --- a/rclcpp/include/rclcpp/service.hpp +++ b/rclcpp/include/rclcpp/service.hpp @@ -89,12 +89,12 @@ class Service : public ServiceBase { public: using CallbackType = std::function< - void( + void ( const std::shared_ptr, std::shared_ptr)>; using CallbackWithHeaderType = std::function< - void( + void ( const std::shared_ptr, const std::shared_ptr, std::shared_ptr)>; diff --git a/rclcpp/include/rclcpp/subscription.hpp b/rclcpp/include/rclcpp/subscription.hpp index e368550b64..45ab45d6dc 100644 --- a/rclcpp/include/rclcpp/subscription.hpp +++ b/rclcpp/include/rclcpp/subscription.hpp @@ -266,8 +266,8 @@ class Subscription : public SubscriptionBase } using GetMessageCallbackType = - std::function; - using MatchesAnyPublishersCallbackType = std::function; + std::function; + using MatchesAnyPublishersCallbackType = std::function; /// Implemenation detail. void setup_intra_process( diff --git a/rclcpp/include/rclcpp/subscription_factory.hpp b/rclcpp/include/rclcpp/subscription_factory.hpp index 66b452ded6..b7d5224a0a 100644 --- a/rclcpp/include/rclcpp/subscription_factory.hpp +++ b/rclcpp/include/rclcpp/subscription_factory.hpp @@ -57,7 +57,7 @@ struct SubscriptionFactory // Function that takes a MessageT from the intra process manager using SetupIntraProcessFunction = std::function< - void( + void ( rclcpp::intra_process_manager::IntraProcessManager::SharedPtr ipm, rclcpp::SubscriptionBase::SharedPtr subscription, const rcl_subscription_options_t & subscription_options)>; diff --git a/rclcpp/include/rclcpp/timer.hpp b/rclcpp/include/rclcpp/timer.hpp index 6dc9815ec1..d79e79cea1 100644 --- a/rclcpp/include/rclcpp/timer.hpp +++ b/rclcpp/include/rclcpp/timer.hpp @@ -89,8 +89,8 @@ class TimerBase }; -using VoidCallbackType = std::function; -using TimerCallbackType = std::function; +using VoidCallbackType = std::function; +using TimerCallbackType = std::function; /// Generic timer templated on the clock type. Periodically executes a user-specified callback. template< From 9e21c1d669318d1c3108644b5ac84f7fb8f2baba Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Thu, 5 Jul 2018 19:16:14 -0700 Subject: [PATCH 3/4] space between reference and variable name in signature --- rclcpp/src/rclcpp/executor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rclcpp/src/rclcpp/executor.cpp b/rclcpp/src/rclcpp/executor.cpp index fc46f74cdf..49d344c7fb 100644 --- a/rclcpp/src/rclcpp/executor.cpp +++ b/rclcpp/src/rclcpp/executor.cpp @@ -628,7 +628,7 @@ rclcpp::executor::operator<<(std::ostream & os, const FutureReturnCode & future_ } std::string -rclcpp::executor::to_string(const FutureReturnCode &future_return_code) +rclcpp::executor::to_string(const FutureReturnCode & future_return_code) { using enum_type = std::underlying_type::type; std::string prefix = "Unknown enum value ("; From 0042154fa346ba257e75072529db09b6ca294758 Mon Sep 17 00:00:00 2001 From: Mikael Arguedas Date: Thu, 5 Jul 2018 19:16:44 -0700 Subject: [PATCH 4/4] questionable space between pointer marker and variable name --- rclcpp/include/rclcpp/exceptions.hpp | 2 +- rclcpp/src/rclcpp/exceptions.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rclcpp/include/rclcpp/exceptions.hpp b/rclcpp/include/rclcpp/exceptions.hpp index 7328ea4e83..326b51882b 100644 --- a/rclcpp/include/rclcpp/exceptions.hpp +++ b/rclcpp/include/rclcpp/exceptions.hpp @@ -116,7 +116,7 @@ throw_from_rcl_error( rcl_ret_t ret, const std::string & prefix = "", const rcl_error_state_t * error_state = nullptr, - void (*reset_error)() = rcl_reset_error); + void (* reset_error)() = rcl_reset_error); class RCLErrorBase { diff --git a/rclcpp/src/rclcpp/exceptions.cpp b/rclcpp/src/rclcpp/exceptions.cpp index bbaa83b17c..b10523c2c0 100644 --- a/rclcpp/src/rclcpp/exceptions.cpp +++ b/rclcpp/src/rclcpp/exceptions.cpp @@ -44,7 +44,7 @@ throw_from_rcl_error( rcl_ret_t ret, const std::string & prefix, const rcl_error_state_t * error_state, - void (*reset_error)()) + void (* reset_error)()) { if (RCL_RET_OK == ret) { throw std::invalid_argument("ret is RCL_RET_OK");