Skip to content

Commit ff1cf21

Browse files
committed
Style was fixed.
Signed-off-by: olesya <bks-ol@mail.ru>
1 parent 07f410e commit ff1cf21

File tree

2 files changed

+25
-11
lines changed

2 files changed

+25
-11
lines changed

rclcpp/include/rclcpp/create_subscription.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ create_subscription(
120120
}
121121

122122
auto factory = rclcpp::create_subscription_factory<MessageT, CallbackT, AllocatorT,
123-
SubscriptionT, MessageMemoryStrategyT,
124-
ROSMessageType
125-
>(
123+
SubscriptionT, MessageMemoryStrategyT,
124+
ROSMessageType
125+
>(
126126
std::forward<CallbackT>(callback),
127127
options,
128128
msg_mem_strat,
129129
subscription_topic_stats
130-
);
130+
);
131131

132132
const rclcpp::QoS & actual_qos = options.qos_overriding_options.get_policy_kinds().size() ?
133133
rclcpp::detail::declare_qos_parameters(

rclcpp/test/rclcpp/test_create_custom_subscription.cpp

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2025 Open Source Robotics Foundation, Inc.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
#include <gtest/gtest.h>
216

317
#include <chrono>
@@ -36,14 +50,14 @@ template<
3650
AllocatorT
3751
>>
3852
class CustomSubscription : public rclcpp::Subscription<
39-
MessageT, AllocatorT, SubscribedT, ROSMessageT, MessageMemoryStrategyT>
53+
MessageT, AllocatorT, SubscribedT, ROSMessageT, MessageMemoryStrategyT>
4054
{
4155
public:
42-
43-
template <typename... Args>
44-
CustomSubscription(Args &&...args) : rclcpp::Subscription<
45-
MessageT, AllocatorT, SubscribedT, ROSMessageT, MessageMemoryStrategyT>(
46-
std::forward<Args>(args)...) {}
56+
template<typename ... Args>
57+
explicit CustomSubscription(Args &&... args)
58+
: rclcpp::Subscription<
59+
MessageT, AllocatorT, SubscribedT, ROSMessageT, MessageMemoryStrategyT>(
60+
std::forward<Args>(args)...) {}
4761
};
4862

4963
TEST_F(TestCreateSubscription, create) {
@@ -69,4 +83,4 @@ TEST_F(TestCreateSubscription, create) {
6983
ASSERT_NE(nullptr, subscription);
7084
EXPECT_STREQ("/ns/topic_name", subscription->get_topic_name());
7185
static_assert(std::is_same_v<std::decay_t<decltype(*subscription.get())>, SubscriptionT>);
72-
}
86+
}

0 commit comments

Comments
 (0)