From 43e53071495e6d79402f6241cf887f85029af0ef Mon Sep 17 00:00:00 2001 From: Dirk Thomas Date: Thu, 28 Sep 2017 13:03:53 -0700 Subject: [PATCH] update style to match latest uncrustify --- rmw_opensplice_cpp/src/demangle.cpp | 9 ++++++--- rmw_opensplice_cpp/src/qos.cpp | 6 +++--- rmw_opensplice_cpp/src/rmw_response.cpp | 3 ++- rmw_opensplice_cpp/src/types.cpp | 20 ++++++++++--------- .../requester.hpp | 3 ++- .../responder.hpp | 3 ++- .../resource/srv__type_support.cpp.em | 4 ++-- 7 files changed, 28 insertions(+), 20 deletions(-) diff --git a/rmw_opensplice_cpp/src/demangle.cpp b/rmw_opensplice_cpp/src/demangle.cpp index bd92b206..8da180d5 100644 --- a/rmw_opensplice_cpp/src/demangle.cpp +++ b/rmw_opensplice_cpp/src/demangle.cpp @@ -63,9 +63,12 @@ _demangle_service_from_topic(const std::string & topic_name) _get_ros_service_request_prefix(), _get_ros_service_response_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_opensplice_cpp/src/qos.cpp b/rmw_opensplice_cpp/src/qos.cpp index 5b6a05cb..81203cd0 100644 --- a/rmw_opensplice_cpp/src/qos.cpp +++ b/rmw_opensplice_cpp/src/qos.cpp @@ -23,7 +23,8 @@ using rosidl_typesupport_opensplice_cpp::impl::check_get_default_datareader_qos; using rosidl_typesupport_opensplice_cpp::impl::check_get_default_datawriter_qos; template -bool set_entity_qos_from_profile(const rmw_qos_profile_t & qos_profile, +bool set_entity_qos_from_profile( + const rmw_qos_profile_t & qos_profile, DDSEntityQos & entity_qos) { switch (qos_profile.history) { @@ -77,8 +78,7 @@ bool set_entity_qos_from_profile(const rmw_qos_profile_t & qos_profile, assert(entity_qos.history.depth >= 0); if ( entity_qos.history.kind == DDS::KEEP_LAST_HISTORY_QOS && - static_cast(entity_qos.history.depth) < qos_profile.depth - ) + static_cast(entity_qos.history.depth) < qos_profile.depth) { if (qos_profile.depth > (std::numeric_limits::max)()) { RMW_SET_ERROR_MSG( diff --git a/rmw_opensplice_cpp/src/rmw_response.cpp b/rmw_opensplice_cpp/src/rmw_response.cpp index 09ede6c5..96ec6041 100644 --- a/rmw_opensplice_cpp/src/rmw_response.cpp +++ b/rmw_opensplice_cpp/src/rmw_response.cpp @@ -75,7 +75,8 @@ rmw_send_response( } rmw_ret_t -rmw_take_response(const rmw_client_t * client, rmw_request_id_t * request_header, +rmw_take_response( + const rmw_client_t * client, rmw_request_id_t * request_header, void * ros_response, bool * taken) { if (!client) { diff --git a/rmw_opensplice_cpp/src/types.cpp b/rmw_opensplice_cpp/src/types.cpp index 984b2558..da8bb1cb 100644 --- a/rmw_opensplice_cpp/src/types.cpp +++ b/rmw_opensplice_cpp/src/types.cpp @@ -53,9 +53,11 @@ CustomDataReaderListener::CustomDataReaderListener() if (discovery_logging_value) { std::string str(discovery_logging_value, discovery_logging_size); std::string str_lower(str); - std::transform(str_lower.begin(), str_lower.end(), str_lower.begin(), [](unsigned char c) { - return std::tolower(c); - }); + std::transform( + str_lower.begin(), str_lower.end(), str_lower.begin(), + [](unsigned char c) { + return std::tolower(c); + }); if (str != "0" && str_lower != "false" && str_lower != "off") { print_discovery_logging_ = true; } @@ -73,12 +75,12 @@ CustomDataReaderListener::count_topic(const char * topic_name) topic_names_and_types_.begin(), topic_names_and_types_.end(), [&](auto tnt) -> bool { - auto fqdn = _demangle_if_ros_topic(tnt.first); - if (fqdn == topic_name) { - return true; - } - return false; - }); + auto fqdn = _demangle_if_ros_topic(tnt.first); + if (fqdn == topic_name) { + return true; + } + return false; + }); size_t count; if (it == topic_names_and_types_.end()) { count = 0; diff --git a/rosidl_typesupport_opensplice_cpp/include/rosidl_typesupport_opensplice_cpp/requester.hpp b/rosidl_typesupport_opensplice_cpp/include/rosidl_typesupport_opensplice_cpp/requester.hpp index f6c736af..d0491ae0 100644 --- a/rosidl_typesupport_opensplice_cpp/include/rosidl_typesupport_opensplice_cpp/requester.hpp +++ b/rosidl_typesupport_opensplice_cpp/include/rosidl_typesupport_opensplice_cpp/requester.hpp @@ -59,7 +59,8 @@ class Requester sequence_number_(0) {} - const char * init(const DDS::DataReaderQos * datareader_qos, + const char * init( + const DDS::DataReaderQos * datareader_qos, const DDS::DataWriterQos * datawriter_qos, bool avoid_ros_namespace_conventions) noexcept { diff --git a/rosidl_typesupport_opensplice_cpp/include/rosidl_typesupport_opensplice_cpp/responder.hpp b/rosidl_typesupport_opensplice_cpp/include/rosidl_typesupport_opensplice_cpp/responder.hpp index b3d7e147..f570150a 100644 --- a/rosidl_typesupport_opensplice_cpp/include/rosidl_typesupport_opensplice_cpp/responder.hpp +++ b/rosidl_typesupport_opensplice_cpp/include/rosidl_typesupport_opensplice_cpp/responder.hpp @@ -46,7 +46,8 @@ class Responder response_topic_(nullptr) {} - const char * init(const DDS::DataReaderQos * datareader_qos, + const char * init( + const DDS::DataReaderQos * datareader_qos, const DDS::DataWriterQos * datawriter_qos, bool avoid_ros_namespace_conventions) { diff --git a/rosidl_typesupport_opensplice_cpp/resource/srv__type_support.cpp.em b/rosidl_typesupport_opensplice_cpp/resource/srv__type_support.cpp.em index 4490a94e..838137c6 100644 --- a/rosidl_typesupport_opensplice_cpp/resource/srv__type_support.cpp.em +++ b/rosidl_typesupport_opensplice_cpp/resource/srv__type_support.cpp.em @@ -508,7 +508,7 @@ take_response__@(spec.srv_name)( } const char * -destroy_requester__@(spec.srv_name)(void * untyped_requester, void (* deallocator)(void *)) +destroy_requester__@(spec.srv_name)(void * untyped_requester, void (*deallocator)(void *)) { using RequesterT = rosidl_typesupport_opensplice_cpp::Requester< @(__dds_msg_type_prefix)_Request_, @@ -534,7 +534,7 @@ destroy_requester__@(spec.srv_name)(void * untyped_requester, void (* deallocato } const char * -destroy_responder__@(spec.srv_name)(void * untyped_responder, void (* deallocator)(void *)) +destroy_responder__@(spec.srv_name)(void * untyped_responder, void (*deallocator)(void *)) { using ResponderT = rosidl_typesupport_opensplice_cpp::Responder< @(__dds_msg_type_prefix)_Request_,