Skip to content

Commit c6b8fb2

Browse files
committed
update
1 parent 9a6b48e commit c6b8fb2

10 files changed

Lines changed: 23 additions & 22 deletions

File tree

rclcpp/include/rclcpp/callback_group.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class CallbackGroup
5454
RCLCPP_MAKE_SHARED_DEFINITIONS(CallbackGroup);
5555

5656
CallbackGroup(CallbackGroupType group_type)
57-
: type_(group_type), can_be_taken_from_(true)
57+
: type_(group_type), can_be_taken_from_(true)
5858
{}
5959

6060
private:

rclcpp/include/rclcpp/client.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class ClientBase
4545
RCLCPP_MAKE_SHARED_DEFINITIONS(ClientBase);
4646

4747
ClientBase(rmw_client_t * client_handle, const std::string & service_name)
48-
: client_handle_(client_handle), service_name_(service_name)
48+
: client_handle_(client_handle), service_name_(service_name)
4949
{}
5050

5151
~ClientBase()
@@ -92,7 +92,7 @@ class Client : public ClientBase
9292
RCLCPP_MAKE_SHARED_DEFINITIONS(Client);
9393

9494
Client(rmw_client_t * client_handle, const std::string & service_name)
95-
: ClientBase(client_handle, service_name)
95+
: ClientBase(client_handle, service_name)
9696
{}
9797

9898
std::shared_ptr<void> create_response()

rclcpp/include/rclcpp/executor.hpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ class Executor
3838
public:
3939
RCLCPP_MAKE_SHARED_DEFINITIONS(Executor);
4040

41-
Executor() : interrupt_guard_condition_(rmw_create_guard_condition()) {}
41+
Executor()
42+
: interrupt_guard_condition_(rmw_create_guard_condition())
43+
{}
4244

4345
virtual ~Executor()
4446
{
@@ -58,8 +60,7 @@ class Executor
5860
auto node = weak_node.lock();
5961
if (node == node_ptr) {
6062
// TODO: Use a different error here?
61-
throw std::runtime_error(
62-
"Cannot add node to executor, node already added.");
63+
throw std::runtime_error("Cannot add node to executor, node already added.");
6364
}
6465
}
6566
weak_nodes_.push_back(node_ptr);
@@ -100,7 +101,9 @@ class Executor
100101
protected:
101102
struct AnyExecutable
102103
{
103-
AnyExecutable() : subscription(0), timer(0), callback_group(0), node(0) {}
104+
AnyExecutable()
105+
: subscription(0), timer(0), callback_group(0), node(0)
106+
{}
104107
// Either the subscription or the timer will be set, but not both
105108
rclcpp::subscription::SubscriptionBase::SharedPtr subscription;
106109
rclcpp::timer::TimerBase::SharedPtr timer;
@@ -313,8 +316,7 @@ class Executor
313316
std::malloc(sizeof(void *) * number_of_guard_conds));
314317
if (guard_condition_handles.guard_conditions == NULL) {
315318
// TODO(wjwwood): Use a different error here? maybe std::bad_alloc?
316-
throw std::runtime_error(
317-
"Could not malloc for guard condition pointers.");
319+
throw std::runtime_error("Could not malloc for guard condition pointers.");
318320
}
319321
// Put the global ctrl-c guard condition in
320322
assert(guard_condition_handles.guard_condition_count > 1);

rclcpp/include/rclcpp/node_impl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ using namespace rclcpp::node;
3434
using rclcpp::contexts::default_context::DefaultContext;
3535

3636
Node::Node(std::string node_name)
37-
: Node(node_name, DefaultContext::make_shared())
37+
: Node(node_name, DefaultContext::make_shared())
3838
{}
3939

4040
Node::Node(std::string node_name, context::Context::SharedPtr context)
41-
: name_(node_name), context_(context),
41+
: name_(node_name), context_(context),
4242
number_of_subscriptions_(0), number_of_timers_(0), number_of_services_(0)
4343
{
4444
node_handle_ = rmw_create_node(name_.c_str());

rclcpp/include/rclcpp/publisher.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Publisher
3939
RCLCPP_MAKE_SHARED_DEFINITIONS(Publisher);
4040

4141
Publisher(rmw_publisher_t * publisher_handle)
42-
: publisher_handle_(publisher_handle)
42+
: publisher_handle_(publisher_handle)
4343
{}
4444

4545
template<typename MessageT>

rclcpp/include/rclcpp/rate.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ class GenericRate : public RateBase
4848
RCLCPP_MAKE_SHARED_DEFINITIONS(GenericRate);
4949

5050
GenericRate(double rate)
51-
: GenericRate<Clock>(
51+
: GenericRate<Clock>(
5252
duration_cast<nanoseconds>(duration<double>(1.0 / rate)))
5353
{}
5454
GenericRate(std::chrono::nanoseconds period)
55-
: period_(period), last_interval_(Clock::now())
55+
: period_(period), last_interval_(Clock::now())
5656
{}
5757

5858
virtual bool

rclcpp/include/rclcpp/service.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ServiceBase
4646
ServiceBase(
4747
rmw_service_t * service_handle,
4848
const std::string service_name)
49-
: service_handle_(service_handle), service_name_(service_name)
49+
: service_handle_(service_handle), service_name_(service_name)
5050
{}
5151

5252
~ServiceBase()
@@ -94,7 +94,7 @@ class Service : public ServiceBase
9494
rmw_service_t * service_handle,
9595
const std::string & service_name,
9696
CallbackType callback)
97-
: ServiceBase(service_handle, service_name), callback_(callback)
97+
: ServiceBase(service_handle, service_name), callback_(callback)
9898
{}
9999

100100
std::shared_ptr<void> create_request()

rclcpp/include/rclcpp/subscription.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class SubscriptionBase
4545
SubscriptionBase(
4646
rmw_subscription_t * subscription_handle,
4747
std::string & topic_name)
48-
: subscription_handle_(subscription_handle), topic_name_(topic_name)
48+
: subscription_handle_(subscription_handle), topic_name_(topic_name)
4949
{}
5050

5151
std::string get_topic_name()
@@ -75,7 +75,7 @@ class Subscription : public SubscriptionBase
7575
rmw_subscription_t * subscription_handle,
7676
std::string & topic_name,
7777
CallbackType callback)
78-
: SubscriptionBase(subscription_handle, topic_name), callback_(callback)
78+
: SubscriptionBase(subscription_handle, topic_name), callback_(callback)
7979
{}
8080

8181
std::shared_ptr<void> create_message()

rclcpp/include/rclcpp/timer.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class TimerBase
4848
RCLCPP_MAKE_SHARED_DEFINITIONS(TimerBase);
4949

5050
TimerBase(std::chrono::nanoseconds period, CallbackType callback)
51-
: period_(period),
51+
: period_(period),
5252
callback_(callback),
5353
canceled_(false)
5454
{
@@ -81,7 +81,7 @@ class GenericTimer : public TimerBase
8181
RCLCPP_MAKE_SHARED_DEFINITIONS(GenericTimer);
8282

8383
GenericTimer(std::chrono::nanoseconds period, CallbackType callback)
84-
: TimerBase(period, callback), loop_rate_(period)
84+
: TimerBase(period, callback), loop_rate_(period)
8585
{
8686
thread_ = std::thread(&GenericTimer<Clock>::run, this);
8787
}

rclcpp/include/rclcpp/utilities.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,7 @@ init(int argc, char * argv[])
109109
#endif
110110
{
111111
throw std::runtime_error(
112-
std::string("Failed to set SIGINT signal handler: (" +
113-
std::to_string(errno) + ")") +
112+
std::string("Failed to set SIGINT signal handler: (" + std::to_string(errno) + ")") +
114113
// TODO(wjwwood): use strerror_r on POSIX and strerror_s on Windows.
115114
std::strerror(errno));
116115
}

0 commit comments

Comments
 (0)