@@ -295,22 +295,16 @@ class Subscription : public SubscriptionBase
295
295
void * loaned_message,
296
296
const rclcpp::MessageInfo & message_info) override
297
297
{
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
- =======
304
298
if (matches_any_intra_process_publishers (&message_info.get_rmw_message_info ().publisher_gid )) {
305
299
// In this case, the message will be delivered via intra process and
306
300
// we should ignore this copy of the message.
307
301
return ;
308
302
}
309
303
310
- auto typed_message = static_cast <ROSMessageType *>(loaned_message);
304
+ auto typed_message = static_cast <CallbackMessageT *>(loaned_message);
311
305
// 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;});
314
308
315
309
std::chrono::time_point<std::chrono::system_clock> now;
316
310
if (subscription_topic_statistics_) {
@@ -319,7 +313,6 @@ class Subscription : public SubscriptionBase
319
313
now = std::chrono::system_clock::now ();
320
314
}
321
315
322
- >>>>>>> 5c688303 (Add statistics for handle_loaned_message (#1927 ))
323
316
any_callback_.dispatch (sptr, message_info);
324
317
325
318
if (subscription_topic_statistics_) {
0 commit comments