ros2 / rmw_cyclonedds

ROS 2 RMW layer for Eclipse Cyclone DDS
Apache License 2.0
117 stars 90 forks source link

remove `default` and manage all cases with `switch` statement. #519

Open fujitatomoya opened 1 month ago

fujitatomoya commented 1 month ago

This is not a bug, follow up from https://github.com/ros2/rmw_cyclonedds/pull/518#pullrequestreview-2374265975

Description

Having default in the switch statement can prevent developers to realize the case. e.g) https://github.com/ros2/rmw_cyclonedds/pull/518#pullrequestreview-2374265975

We can manage all cases in the statement, so that we will not miss the case by compiler notification.