Skip to content

Commit 47b892e

Browse files
committed
Fix merge conflicts
Signed-off-by: Barry Xu <barry.xu@sony.com>
1 parent 639c665 commit 47b892e

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

rclcpp/include/rclcpp/subscription.hpp

+3-10
Original file line numberDiff line numberDiff line change
@@ -295,22 +295,16 @@ class Subscription : public SubscriptionBase
295295
void * loaned_message,
296296
const rclcpp::MessageInfo & message_info) override
297297
{
298-
<<<<<<< HEAD
299-
auto typed_message = static_cast<CallbackMessageT *>(loaned_message);
300-
// message is loaned, so we have to make sure that the deleter does not deallocate the message
301-
auto sptr = std::shared_ptr<CallbackMessageT>(
302-
typed_message, [](CallbackMessageT * msg) {(void) msg;});
303-
=======
304298
if (matches_any_intra_process_publishers(&message_info.get_rmw_message_info().publisher_gid)) {
305299
// In this case, the message will be delivered via intra process and
306300
// we should ignore this copy of the message.
307301
return;
308302
}
309303

310-
auto typed_message = static_cast<ROSMessageType *>(loaned_message);
304+
auto typed_message = static_cast<CallbackMessageT *>(loaned_message);
311305
// message is loaned, so we have to make sure that the deleter does not deallocate the message
312-
auto sptr = std::shared_ptr<ROSMessageType>(
313-
typed_message, [](ROSMessageType * msg) {(void) msg;});
306+
auto sptr = std::shared_ptr<CallbackMessageT>(
307+
typed_message, [](CallbackMessageT * msg) {(void) msg;});
314308

315309
std::chrono::time_point<std::chrono::system_clock> now;
316310
if (subscription_topic_statistics_) {
@@ -319,7 +313,6 @@ class Subscription : public SubscriptionBase
319313
now = std::chrono::system_clock::now();
320314
}
321315

322-
>>>>>>> 5c688303 (Add statistics for handle_loaned_message (#1927))
323316
any_callback_.dispatch(sptr, message_info);
324317

325318
if (subscription_topic_statistics_) {

0 commit comments

Comments
 (0)