Skip to content

Commit

Permalink
update style to match latest uncrustify
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Sep 28, 2017
1 parent a9ffcc5 commit 26ac23d
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 21 deletions.
9 changes: 5 additions & 4 deletions rmw_fastrtps_cpp/include/rmw_fastrtps_cpp/TypeSupport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ std::function<uint32_t()> TypeSupport<MembersType>::getSerializedSizeProvider(vo
assert(data);

eprosima::fastcdr::Cdr * ser = static_cast<eprosima::fastcdr::Cdr *>(data);
return [ser]()->uint32_t {return static_cast<uint32_t>(ser->getSerializedDataLength()); };
return [ser]() -> uint32_t {return static_cast<uint32_t>(ser->getSerializedDataLength());};
}

} // namespace rmw_fastrtps_cpp
Expand Down
9 changes: 6 additions & 3 deletions rmw_fastrtps_cpp/src/demangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 "";
Expand Down
6 changes: 2 additions & 4 deletions rmw_fastrtps_cpp/src/qos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<size_t>(sattr.topic.historyQos.depth) < qos_policies.depth
)
static_cast<size_t>(sattr.topic.historyQos.depth) < qos_policies.depth)
{
if (qos_policies.depth > (std::numeric_limits<int32_t>::max)()) {
RMW_SET_ERROR_MSG(
Expand Down Expand Up @@ -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<size_t>(pattr.topic.historyQos.depth) < qos_policies.depth
)
static_cast<size_t>(pattr.topic.historyQos.depth) < qos_policies.depth)
{
if (qos_policies.depth > (std::numeric_limits<int32_t>::max)()) {
RMW_SET_ERROR_MSG(
Expand Down
3 changes: 2 additions & 1 deletion rmw_fastrtps_cpp/src/rmw_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
3 changes: 2 additions & 1 deletion rmw_fastrtps_cpp/src/rmw_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
6 changes: 4 additions & 2 deletions rmw_fastrtps_cpp/src/rmw_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions rmw_fastrtps_cpp/src/rmw_response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
{
Expand Down
3 changes: 2 additions & 1 deletion rmw_fastrtps_cpp/src/rmw_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
3 changes: 2 additions & 1 deletion rmw_fastrtps_cpp/src/rmw_subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
3 changes: 2 additions & 1 deletion rmw_fastrtps_cpp/src/rmw_wait.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 26ac23d

Please sign in to comment.