ros2 / rmw_zenoh

RMW for ROS 2 using Zenoh as the middleware
Apache License 2.0
142 stars 29 forks source link

Move the event_map out of the header file. #226

Closed clalancette closed 3 days ago

clalancette commented 3 days ago

The main reason for this is that putting it in the header file means that it is duplicated into every compilation unit that includes it. This is slow, and in theory can cause issues if a pointer to the map is passed between compilation units.

Instead, hide the map inside of the events.cpp file, and add a free function that converts between an RMW event type and a Zenoh event type.

clalancette commented 3 days ago

Going ahead and merging this one, thanks for the review!