Closed Yadunund closed 3 months ago
Hm, I guess you are right. Converting a char to a std::string does indeed seem to do a copy of the string. That's good to know. Personally, I prefer this to be explicit, and so I would pass the char into the TopicInfo, and have TopicInfo be responsible for both copying and releasing the string. But I leave it to you.
I think we can keep things as they are right now. The constructor args make it apparent that a copy of a string should be passed. I could convert some of them to const chat * const
but then we'd be making a copy in rmw_zenoh.cpp
for args like topic_type
which we obtain as an std::string
(now I just std::move()
this string to the TopicInfo
constructor.)
Builds off #171 to include the type hash in the liveliness token and populate the same when filling out endpoint info. As a result the type hash is now available when introspecting topics. Previously the type hash would show
INVALID
.To test:
The type hash should be filled in the result