From 26ac23da0755abb623b88efb6fb78552a25daa3e Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Thu, 28 Sep 2017 10:14:04 -0700 Subject: [PATCH] update style to match latest uncrustify --- .../include/rmw_fastrtps_cpp/TypeSupport.hpp | 9 +++++---- .../include/rmw_fastrtps_cpp/TypeSupport_impl.hpp | 2 +- rmw_fastrtps_cpp/src/demangle.cpp | 9 ++++++--- rmw_fastrtps_cpp/src/qos.cpp | 6 ++---- rmw_fastrtps_cpp/src/rmw_client.cpp | 3 ++- rmw_fastrtps_cpp/src/rmw_publisher.cpp | 3 ++- rmw_fastrtps_cpp/src/rmw_request.cpp | 6 ++++-- rmw_fastrtps_cpp/src/rmw_response.cpp | 6 ++++-- rmw_fastrtps_cpp/src/rmw_service.cpp | 3 ++- rmw_fastrtps_cpp/src/rmw_subscription.cpp | 3 ++- rmw_fastrtps_cpp/src/rmw_wait.cpp | 3 ++- 11 files changed, 32 insertions(+), 21 deletions(-) diff --git a/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport.hpp b/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport.hpp index 4b98f7965..115353f81 100644 --- a/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport.hpp +++ b/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport.hpp @@ -133,11 +133,12 @@ class TypeSupport : public eprosima::fastrtps::TopicDataType const MembersType * members_; private: - bool serializeROSmessage(eprosima::fastcdr::Cdr & ser, const MembersType * members, - const void * ros_message); + bool serializeROSmessage( + eprosima::fastcdr::Cdr & ser, const MembersType * members, const void * ros_message); - bool deserializeROSmessage(eprosima::fastcdr::Cdr & deser, const MembersType * members, - void * ros_message, bool call_new); + bool deserializeROSmessage( + eprosima::fastcdr::Cdr & deser, const MembersType * members, void * ros_message, + bool call_new); }; } // namespace rmw_fastrtps_cpp diff --git a/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport_impl.hpp b/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport_impl.hpp index 4a8e49841..f22dd8019 100644 --- a/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport_impl.hpp +++ b/rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport_impl.hpp @@ -901,7 +901,7 @@ std::function TypeSupport::getSerializedSizeProvider(vo assert(data); eprosima::fastcdr::Cdr * ser = static_cast(data); - return [ser]()->uint32_t {return static_cast(ser->getSerializedDataLength()); }; + return [ser]() -> uint32_t {return static_cast(ser->getSerializedDataLength());}; } } // namespace rmw_fastrtps_cpp diff --git a/rmw_fastrtps_cpp/src/demangle.cpp b/rmw_fastrtps_cpp/src/demangle.cpp index 854ed41bb..dd96d8a1f 100644 --- a/rmw_fastrtps_cpp/src/demangle.cpp +++ b/rmw_fastrtps_cpp/src/demangle.cpp @@ -64,9 +64,12 @@ _demangle_service_from_topic(const std::string & topic_name) ros_service_response_prefix, ros_service_requester_prefix, }; - if (std::none_of(prefixes.cbegin(), prefixes.cend(), [&prefix](auto x) { - return prefix == x; - })) + if ( + std::none_of( + prefixes.cbegin(), prefixes.cend(), + [&prefix](auto x) { + return prefix == x; + })) { // not a ROS service topic return ""; diff --git a/rmw_fastrtps_cpp/src/qos.cpp b/rmw_fastrtps_cpp/src/qos.cpp index b796ed5aa..694aa4b00 100644 --- a/rmw_fastrtps_cpp/src/qos.cpp +++ b/rmw_fastrtps_cpp/src/qos.cpp @@ -78,8 +78,7 @@ get_datareader_qos( assert(sattr.topic.historyQos.depth >= 0); if ( sattr.topic.historyQos.kind == eprosima::fastrtps::KEEP_LAST_HISTORY_QOS && - static_cast(sattr.topic.historyQos.depth) < qos_policies.depth - ) + static_cast(sattr.topic.historyQos.depth) < qos_policies.depth) { if (qos_policies.depth > (std::numeric_limits::max)()) { RMW_SET_ERROR_MSG( @@ -146,8 +145,7 @@ get_datawriter_qos( assert(pattr.topic.historyQos.depth >= 0); if ( pattr.topic.historyQos.kind == eprosima::fastrtps::KEEP_LAST_HISTORY_QOS && - static_cast(pattr.topic.historyQos.depth) < qos_policies.depth - ) + static_cast(pattr.topic.historyQos.depth) < qos_policies.depth) { if (qos_policies.depth > (std::numeric_limits::max)()) { RMW_SET_ERROR_MSG( diff --git a/rmw_fastrtps_cpp/src/rmw_client.cpp b/rmw_fastrtps_cpp/src/rmw_client.cpp index faadcb33a..a4a61a1c8 100644 --- a/rmw_fastrtps_cpp/src/rmw_client.cpp +++ b/rmw_fastrtps_cpp/src/rmw_client.cpp @@ -35,7 +35,8 @@ extern "C" { rmw_client_t * -rmw_create_client(const rmw_node_t * node, +rmw_create_client( + const rmw_node_t * node, const rosidl_service_type_support_t * type_supports, const char * service_name, const rmw_qos_profile_t * qos_policies) { diff --git a/rmw_fastrtps_cpp/src/rmw_publisher.cpp b/rmw_fastrtps_cpp/src/rmw_publisher.cpp index 135fc88ec..082a9cda8 100644 --- a/rmw_fastrtps_cpp/src/rmw_publisher.cpp +++ b/rmw_fastrtps_cpp/src/rmw_publisher.cpp @@ -29,7 +29,8 @@ extern "C" { rmw_publisher_t * -rmw_create_publisher(const rmw_node_t * node, +rmw_create_publisher( + const rmw_node_t * node, const rosidl_message_type_support_t * type_supports, const char * topic_name, const rmw_qos_profile_t * qos_policies) { diff --git a/rmw_fastrtps_cpp/src/rmw_request.cpp b/rmw_fastrtps_cpp/src/rmw_request.cpp index 8b01c7e2f..0642a88e7 100644 --- a/rmw_fastrtps_cpp/src/rmw_request.cpp +++ b/rmw_fastrtps_cpp/src/rmw_request.cpp @@ -31,7 +31,8 @@ extern "C" { rmw_ret_t -rmw_send_request(const rmw_client_t * client, +rmw_send_request( + const rmw_client_t * client, const void * ros_request, int64_t * sequence_id) { @@ -73,7 +74,8 @@ rmw_send_request(const rmw_client_t * client, } rmw_ret_t -rmw_take_request(const rmw_service_t * service, +rmw_take_request( + const rmw_service_t * service, rmw_request_id_t * request_header, void * ros_request, bool * taken) diff --git a/rmw_fastrtps_cpp/src/rmw_response.cpp b/rmw_fastrtps_cpp/src/rmw_response.cpp index dc5f183bf..4dc2b0195 100644 --- a/rmw_fastrtps_cpp/src/rmw_response.cpp +++ b/rmw_fastrtps_cpp/src/rmw_response.cpp @@ -29,7 +29,8 @@ extern "C" { rmw_ret_t -rmw_take_response(const rmw_client_t * client, +rmw_take_response( + const rmw_client_t * client, rmw_request_id_t * request_header, void * ros_response, bool * taken) @@ -67,7 +68,8 @@ rmw_take_response(const rmw_client_t * client, } rmw_ret_t -rmw_send_response(const rmw_service_t * service, +rmw_send_response( + const rmw_service_t * service, rmw_request_id_t * request_header, void * ros_response) { diff --git a/rmw_fastrtps_cpp/src/rmw_service.cpp b/rmw_fastrtps_cpp/src/rmw_service.cpp index 2dfec2e85..ccd72f0b6 100644 --- a/rmw_fastrtps_cpp/src/rmw_service.cpp +++ b/rmw_fastrtps_cpp/src/rmw_service.cpp @@ -45,7 +45,8 @@ extern "C" { rmw_service_t * -rmw_create_service(const rmw_node_t * node, +rmw_create_service( + const rmw_node_t * node, const rosidl_service_type_support_t * type_supports, const char * service_name, const rmw_qos_profile_t * qos_policies) { diff --git a/rmw_fastrtps_cpp/src/rmw_subscription.cpp b/rmw_fastrtps_cpp/src/rmw_subscription.cpp index 337c2a38f..7827623de 100644 --- a/rmw_fastrtps_cpp/src/rmw_subscription.cpp +++ b/rmw_fastrtps_cpp/src/rmw_subscription.cpp @@ -33,7 +33,8 @@ extern "C" { rmw_subscription_t * -rmw_create_subscription(const rmw_node_t * node, +rmw_create_subscription( + const rmw_node_t * node, const rosidl_message_type_support_t * type_supports, const char * topic_name, const rmw_qos_profile_t * qos_policies, bool ignore_local_publications) { diff --git a/rmw_fastrtps_cpp/src/rmw_wait.cpp b/rmw_fastrtps_cpp/src/rmw_wait.cpp index 7a4cbf4b8..27eb610f3 100644 --- a/rmw_fastrtps_cpp/src/rmw_wait.cpp +++ b/rmw_fastrtps_cpp/src/rmw_wait.cpp @@ -25,7 +25,8 @@ // helper function for wait bool -check_waitset_for_data(const rmw_subscriptions_t * subscriptions, +check_waitset_for_data( + const rmw_subscriptions_t * subscriptions, const rmw_guard_conditions_t * guard_conditions, const rmw_services_t * services, const rmw_clients_t * clients)