From 1a604b0c280475ceebf8e2571383bbe436963b61 Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Thu, 1 Mar 2018 08:58:52 -0800 Subject: [PATCH] update style (#445) --- .../rclcpp/allocator/allocator_deleter.hpp | 10 +++---- .../include/rclcpp/any_service_callback.hpp | 18 ++++++------- .../rclcpp/any_subscription_callback.hpp | 6 ++--- rclcpp/include/rclcpp/function_traits.hpp | 2 +- .../rclcpp/intra_process_manager_impl.hpp | 26 +++++++++---------- .../node_parameters_interface.hpp | 4 +-- rclcpp/include/rclcpp/publisher_factory.hpp | 18 ++++++------- rclcpp/include/rclcpp/service.hpp | 14 +++++----- .../strategies/allocator_memory_strategy.hpp | 2 +- rclcpp/include/rclcpp/subscription.hpp | 2 +- .../include/rclcpp/subscription_factory.hpp | 16 ++++++------ rclcpp/src/rclcpp/executor.cpp | 2 +- rclcpp/src/rclcpp/parameter.cpp | 2 +- .../src/lifecycle_node_interface_impl.hpp | 4 +-- 14 files changed, 63 insertions(+), 63 deletions(-) diff --git a/rclcpp/include/rclcpp/allocator/allocator_deleter.hpp b/rclcpp/include/rclcpp/allocator/allocator_deleter.hpp index ff79c40..8e44ea8 100644 --- a/rclcpp/include/rclcpp/allocator/allocator_deleter.hpp +++ b/rclcpp/include/rclcpp/allocator/allocator_deleter.hpp @@ -94,11 +94,11 @@ void set_allocator_for_deleter(AllocatorDeleter * deleter, Alloc * alloc) template using Deleter = typename std::conditional< - std::is_same::template rebind_alloc, - typename std::allocator::template rebind::other>::value, - std::default_delete, - AllocatorDeleter - >::type; + std::is_same::template rebind_alloc, + typename std::allocator::template rebind::other>::value, + std::default_delete, + AllocatorDeleter + >::type; } // namespace allocator } // namespace rclcpp diff --git a/rclcpp/include/rclcpp/any_service_callback.hpp b/rclcpp/include/rclcpp/any_service_callback.hpp index 598e0ef..b90bd12 100644 --- a/rclcpp/include/rclcpp/any_service_callback.hpp +++ b/rclcpp/include/rclcpp/any_service_callback.hpp @@ -32,16 +32,16 @@ class AnyServiceCallback { private: using SharedPtrCallback = std::function< - void( - const std::shared_ptr, - std::shared_ptr - )>; + void( + const std::shared_ptr, + std::shared_ptr + )>; using SharedPtrWithRequestHeaderCallback = std::function< - void( - const std::shared_ptr, - const std::shared_ptr, - std::shared_ptr - )>; + void( + const std::shared_ptr, + const std::shared_ptr, + std::shared_ptr + )>; SharedPtrCallback shared_ptr_callback_; SharedPtrWithRequestHeaderCallback shared_ptr_with_request_header_callback_; diff --git a/rclcpp/include/rclcpp/any_subscription_callback.hpp b/rclcpp/include/rclcpp/any_subscription_callback.hpp index 5850126..ccbbb9c 100644 --- a/rclcpp/include/rclcpp/any_subscription_callback.hpp +++ b/rclcpp/include/rclcpp/any_subscription_callback.hpp @@ -40,13 +40,13 @@ class AnySubscriptionCallback using SharedPtrCallback = std::function)>; using SharedPtrWithInfoCallback = - std::function, const rmw_message_info_t &)>; + std::function, const rmw_message_info_t &)>; using ConstSharedPtrCallback = std::function)>; using ConstSharedPtrWithInfoCallback = - std::function, const rmw_message_info_t &)>; + 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/function_traits.hpp b/rclcpp/include/rclcpp/function_traits.hpp index 5f55cff..16768d7 100644 --- a/rclcpp/include/rclcpp/function_traits.hpp +++ b/rclcpp/include/rclcpp/function_traits.hpp @@ -49,7 +49,7 @@ template struct function_traits { using arguments = typename tuple_tail< - typename function_traits::arguments>::type; + typename function_traits::arguments>::type; static constexpr std::size_t arity = std::tuple_size::value; diff --git a/rclcpp/include/rclcpp/intra_process_manager_impl.hpp b/rclcpp/include/rclcpp/intra_process_manager_impl.hpp index 553c44e..beeaf4c 100644 --- a/rclcpp/include/rclcpp/intra_process_manager_impl.hpp +++ b/rclcpp/include/rclcpp/intra_process_manager_impl.hpp @@ -258,9 +258,9 @@ private: using AllocSet = std::set, RebindAlloc>; using SubscriptionMap = std::unordered_map< - uint64_t, SubscriptionBase::WeakPtr, - std::hash, std::equal_to, - RebindAlloc>>; + uint64_t, SubscriptionBase::WeakPtr, + std::hash, std::equal_to, + RebindAlloc>>; struct strcmp_wrapper : public std::binary_function { @@ -271,10 +271,10 @@ private: } }; using IDTopicMap = std::map< - const char *, - AllocSet, - strcmp_wrapper, - RebindAlloc>>; + const char *, + AllocSet, + strcmp_wrapper, + RebindAlloc>>; SubscriptionMap subscriptions_; @@ -291,16 +291,16 @@ private: mapped_ring_buffer::MappedRingBufferBase::SharedPtr buffer; using TargetSubscriptionsMap = std::unordered_map< - uint64_t, AllocSet, - std::hash, std::equal_to, - RebindAlloc>>; + uint64_t, AllocSet, + std::hash, std::equal_to, + RebindAlloc>>; TargetSubscriptionsMap target_subscriptions_by_message_sequence; }; using PublisherMap = std::unordered_map< - uint64_t, PublisherInfo, - std::hash, std::equal_to, - RebindAlloc>>; + uint64_t, PublisherInfo, + std::hash, std::equal_to, + RebindAlloc>>; PublisherMap publishers_; diff --git a/rclcpp/include/rclcpp/node_interfaces/node_parameters_interface.hpp b/rclcpp/include/rclcpp/node_interfaces/node_parameters_interface.hpp index c936728..7902130 100644 --- a/rclcpp/include/rclcpp/node_interfaces/node_parameters_interface.hpp +++ b/rclcpp/include/rclcpp/node_interfaces/node_parameters_interface.hpp @@ -82,8 +82,8 @@ public: list_parameters(const std::vector & prefixes, uint64_t depth) const = 0; using ParametersCallbackFunction = std::function< - rcl_interfaces::msg::SetParametersResult( - const std::vector &)>; + rcl_interfaces::msg::SetParametersResult( + const std::vector &)>; RCLCPP_PUBLIC virtual diff --git a/rclcpp/include/rclcpp/publisher_factory.hpp b/rclcpp/include/rclcpp/publisher_factory.hpp index def1bc3..4044d1a 100644 --- a/rclcpp/include/rclcpp/publisher_factory.hpp +++ b/rclcpp/include/rclcpp/publisher_factory.hpp @@ -46,19 +46,19 @@ struct PublisherFactory { // Creates a PublisherT publisher object and returns it as a PublisherBase. using PublisherFactoryFunction = std::function< - rclcpp::PublisherBase::SharedPtr( - rclcpp::node_interfaces::NodeBaseInterface * node_base, - const std::string & topic_name, - rcl_publisher_options_t & publisher_options)>; + rclcpp::PublisherBase::SharedPtr( + rclcpp::node_interfaces::NodeBaseInterface * node_base, + const std::string & topic_name, + rcl_publisher_options_t & publisher_options)>; PublisherFactoryFunction create_typed_publisher; // Adds the PublisherBase to the intraprocess manager with the correctly // templated call to IntraProcessManager::store_intra_process_message. using AddPublisherToIntraProcessManagerFunction = std::function< - uint64_t( - rclcpp::intra_process_manager::IntraProcessManager * ipm, - rclcpp::PublisherBase::SharedPtr publisher)>; + uint64_t( + rclcpp::intra_process_manager::IntraProcessManager * ipm, + rclcpp::PublisherBase::SharedPtr publisher)>; AddPublisherToIntraProcessManagerFunction add_publisher_to_intra_process_manager; @@ -66,8 +66,8 @@ struct PublisherFactory // PublisherT::publish() and which handles the intra process transmission of // the message being published. using SharedPublishCallbackFactoryFunction = std::function< - rclcpp::PublisherBase::StoreMessageCallbackT( - rclcpp::intra_process_manager::IntraProcessManager::SharedPtr ipm)>; + rclcpp::PublisherBase::StoreMessageCallbackT( + rclcpp::intra_process_manager::IntraProcessManager::SharedPtr ipm)>; SharedPublishCallbackFactoryFunction create_shared_publish_callback; }; diff --git a/rclcpp/include/rclcpp/service.hpp b/rclcpp/include/rclcpp/service.hpp index 79038ac..ec8193f 100644 --- a/rclcpp/include/rclcpp/service.hpp +++ b/rclcpp/include/rclcpp/service.hpp @@ -94,15 +94,15 @@ class Service : public ServiceBase { public: using CallbackType = std::function< - void( - const std::shared_ptr, - std::shared_ptr)>; + void( + const std::shared_ptr, + std::shared_ptr)>; using CallbackWithHeaderType = std::function< - void( - const std::shared_ptr, - const std::shared_ptr, - std::shared_ptr)>; + void( + const std::shared_ptr, + const std::shared_ptr, + std::shared_ptr)>; RCLCPP_SMART_PTR_DEFINITIONS(Service) Service( diff --git a/rclcpp/include/rclcpp/strategies/allocator_memory_strategy.hpp b/rclcpp/include/rclcpp/strategies/allocator_memory_strategy.hpp index 26919c1..588c587 100644 --- a/rclcpp/include/rclcpp/strategies/allocator_memory_strategy.hpp +++ b/rclcpp/include/rclcpp/strategies/allocator_memory_strategy.hpp @@ -387,7 +387,7 @@ public: private: template using VectorRebind = - std::vector::template rebind_alloc>; + std::vector::template rebind_alloc>; VectorRebind guard_conditions_; diff --git a/rclcpp/include/rclcpp/subscription.hpp b/rclcpp/include/rclcpp/subscription.hpp index 7967dc5..bfbb0fe 100644 --- a/rclcpp/include/rclcpp/subscription.hpp +++ b/rclcpp/include/rclcpp/subscription.hpp @@ -229,7 +229,7 @@ public: } using GetMessageCallbackType = - std::function; + std::function; using MatchesAnyPublishersCallbackType = std::function; /// Implemenation detail. diff --git a/rclcpp/include/rclcpp/subscription_factory.hpp b/rclcpp/include/rclcpp/subscription_factory.hpp index ad40f8a..024f329 100644 --- a/rclcpp/include/rclcpp/subscription_factory.hpp +++ b/rclcpp/include/rclcpp/subscription_factory.hpp @@ -47,19 +47,19 @@ struct SubscriptionFactory { // Creates a Subscription object and returns it as a SubscriptionBase. using SubscriptionFactoryFunction = std::function< - rclcpp::SubscriptionBase::SharedPtr( - rclcpp::node_interfaces::NodeBaseInterface * node_base, - const std::string & topic_name, - rcl_subscription_options_t & subscription_options)>; + rclcpp::SubscriptionBase::SharedPtr( + rclcpp::node_interfaces::NodeBaseInterface * node_base, + const std::string & topic_name, + rcl_subscription_options_t & subscription_options)>; SubscriptionFactoryFunction create_typed_subscription; // Function that takes a MessageT from the intra process manager using SetupIntraProcessFunction = std::function< - void( - rclcpp::intra_process_manager::IntraProcessManager::SharedPtr ipm, - rclcpp::SubscriptionBase::SharedPtr subscription, - const rcl_subscription_options_t & subscription_options)>; + void( + rclcpp::intra_process_manager::IntraProcessManager::SharedPtr ipm, + rclcpp::SubscriptionBase::SharedPtr subscription, + const rcl_subscription_options_t & subscription_options)>; SetupIntraProcessFunction setup_intra_process; }; diff --git a/rclcpp/src/rclcpp/executor.cpp b/rclcpp/src/rclcpp/executor.cpp index 54e37f7..f6a97bf 100644 --- a/rclcpp/src/rclcpp/executor.cpp +++ b/rclcpp/src/rclcpp/executor.cpp @@ -603,7 +603,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 ("; diff --git a/rclcpp/src/rclcpp/parameter.cpp b/rclcpp/src/rclcpp/parameter.cpp index 7e0d289..cd79355 100644 --- a/rclcpp/src/rclcpp/parameter.cpp +++ b/rclcpp/src/rclcpp/parameter.cpp @@ -227,7 +227,7 @@ ParameterVariant::value_to_string() const } std::string -rclcpp::parameter::_to_json_dict_entry(const ParameterVariant & param) +rclcpp::parameter::_to_json_dict_entry(const ParameterVariant ¶m) { std::stringstream ss; ss << "\"" << param.get_name() << "\": "; diff --git a/rclcpp_lifecycle/src/lifecycle_node_interface_impl.hpp b/rclcpp_lifecycle/src/lifecycle_node_interface_impl.hpp index 0d7f5b7..57f9b32 100644 --- a/rclcpp_lifecycle/src/lifecycle_node_interface_impl.hpp +++ b/rclcpp_lifecycle/src/lifecycle_node_interface_impl.hpp @@ -409,9 +409,9 @@ public: using ChangeStateSrvPtr = std::shared_ptr>; using GetStateSrvPtr = std::shared_ptr>; using GetAvailableStatesSrvPtr = - std::shared_ptr>; + std::shared_ptr>; using GetAvailableTransitionsSrvPtr = - std::shared_ptr>; + std::shared_ptr>; NodeBasePtr node_base_interface_; NodeServicesPtr node_services_interface_;