Skip to content

Commit

Permalink
fix unused variable warning
Browse files Browse the repository at this point in the history
Signed-off-by: William Woodall <william@osrfoundation.org>
  • Loading branch information
wjwwood committed Apr 1, 2021
1 parent b583ea7 commit 285fd8b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rclcpp/include/rclcpp/any_subscription_callback.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ class AnySubscriptionCallback
MessageAllocTraits::construct(message_allocator_, ptr, *message);
return std::unique_ptr<MessageT, MessageDeleter>(ptr, message_deleter_);
};
// Avoid an unused variable warning in constexpr-if cases below where it is not used.
(void)create_unique_ptr_from_shared_ptr_message;

if constexpr (std::is_same_v<T, ConstRefCallback>) {
callback(*message);
Expand Down

0 comments on commit 285fd8b

Please sign in to comment.