Skip to content

Commit f5e622b

Browse files
Add comment where concrete type support is used (#353)
Signed-off-by: Christophe Bedard <[email protected]>
1 parent 2e491ab commit f5e622b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rmw_email_cpp/src/conversion.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ std::string msg_to_yaml(
117117
const rmw_email_pub_t * publisher,
118118
const void * msg)
119119
{
120+
// We already have the concrete type support handle here for the publisher, but we don't know if
121+
// it's C or C++. Since C/C++ are treated differently, we need to know which one it is.
122+
// Try to get the C type support handle from it, which will return the same handle/pointer if it's
123+
// C, otherwise it will return nullptr, in which case we try C++.
120124
const rosidl_message_type_support_t * ts = nullptr;
121125
ts = get_message_typesupport_handle(
122126
&publisher->type_supports,

0 commit comments

Comments
 (0)