Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #251 from ros2/uncrustify_master
Browse files Browse the repository at this point in the history
update style to match latest uncrustify
  • Loading branch information
dirk-thomas authored Sep 29, 2017
2 parents a121377 + fa25f93 commit 5f50241
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 25 deletions.
6 changes: 3 additions & 3 deletions rmw_connext_cpp/src/rmw_wait.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ rmw_wait(
rmw_waitset_t * waitset,
const rmw_time_t * wait_timeout)
{
return wait<ConnextStaticSubscriberInfo, ConnextStaticServiceInfo, ConnextStaticClientInfo>
(rti_connext_identifier, subscriptions, guard_conditions, services, clients, waitset,
wait_timeout);
return wait<ConnextStaticSubscriberInfo, ConnextStaticServiceInfo, ConnextStaticClientInfo>(
rti_connext_identifier, subscriptions, guard_conditions, services, clients, waitset,
wait_timeout);
}
} // extern "C"
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ create_guard_condition(const char * implementation_identifier);

RMW_CONNEXT_SHARED_CPP_PUBLIC
rmw_ret_t
destroy_guard_condition(const char * implementation_identifier,
destroy_guard_condition(
const char * implementation_identifier,
rmw_guard_condition_t * guard_condition);

#endif // RMW_CONNEXT_SHARED_CPP__GUARD_CONDITION_HPP_
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ set_entity_qos_from_profile(
assert(entity_qos.history.depth >= 0);
if (
entity_qos.history.kind == DDS::KEEP_LAST_HISTORY_QOS &&
static_cast<size_t>(entity_qos.history.depth) < qos_profile.depth
)
static_cast<size_t>(entity_qos.history.depth) < qos_profile.depth)
{
if (qos_profile.depth > (std::numeric_limits<DDS_Long>::max)()) {
RMW_SET_ERROR_MSG(
Expand Down
24 changes: 12 additions & 12 deletions rmw_connext_shared_cpp/src/count.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ count_publishers(
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;
});
if (it == topic_names_and_types.end()) {
*count = 0;
} else {
Expand Down Expand Up @@ -112,12 +112,12 @@ count_subscribers(
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;
});
if (it == topic_names_and_types.end()) {
*count = 0;
} else {
Expand Down
9 changes: 6 additions & 3 deletions rmw_connext_shared_cpp/src/demangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,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
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void * create_requester__@(spec.srv_name)(
}
const char * destroy_requester__@(spec.srv_name)(
void * untyped_requester,
void (* deallocator)(void *))
void (*deallocator)(void *))
{
return @(spec.pkg_name)::srv::typesupport_connext_cpp::destroy_requester__@(spec.srv_name)(
untyped_requester, deallocator);
Expand Down Expand Up @@ -147,7 +147,7 @@ void * create_replier__@(spec.srv_name)(

const char * destroy_replier__@(spec.srv_name)(
void * untyped_replier,
void (* deallocator)(void *))
void (*deallocator)(void *))
{
return @(spec.pkg_name)::srv::typesupport_connext_cpp::destroy_replier__@(spec.srv_name)(
untyped_replier, deallocator);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void * create_requester__@(spec.srv_name)(

const char * destroy_requester__@(spec.srv_name)(
void * untyped_requester,
void (* deallocator)(void *))
void (*deallocator)(void *))
{
using RequesterType = connext::Requester<
@(spec.pkg_name)::srv::dds_::@(spec.srv_name)_Request_,
Expand Down Expand Up @@ -215,7 +215,7 @@ void * create_replier__@(spec.srv_name)(

const char * destroy_replier__@(spec.srv_name)(
void * untyped_replier,
void (* deallocator)(void *))
void (*deallocator)(void *))
{
using ReplierType = connext::Replier<
@(spec.pkg_name)::srv::dds_::@(spec.srv_name)_Request_,
Expand Down

0 comments on commit 5f50241

Please sign in to comment.