Rename enums to avoid collisions with MSVC compiler defines#49
Rename enums to avoid collisions with MSVC compiler defines#49jacobperron merged 1 commit intoros2from
Conversation
Resolves ros2/build_farmer#237. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Connected to ros-visualization/interactive_markers#49. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
cottsay
left a comment
There was a problem hiding this comment.
CI looks great - thanks for the quick fix!
|
Doesn't this change API and require existing code to be updated (when ported to ROS 2)? Wouldn't it be another option to undefine the macros on Windows? |
The API was already changed in #44. For example, instead of OK in ROS 1, it was changed to INFO (and now STATUS_INFO). State state variables aren't exposed in ROS 1, were only exposed for testing purposes in ROS 2. |
|
That being said, I'm also open to undefining the troublesome Windows macros if there's a better argument for that. |
dirk-thomas
left a comment
There was a problem hiding this comment.
Sounds good to me then.
Connected to ros-visualization/interactive_markers#49. Signed-off-by: Jacob Perron <jacob@openrobotics.org>
|
These should probably be enum classes. |
Not a bad idea. But I don't think it resolves the clash we had with MSVC since it was caused by the preprocessor. |
It should resolve that as well, since the names in an enum class are in their own namespace i.e. |
|
🤔 I think it would still fail at the declaration: Just a guess, I haven't tried. |
|
you're right, that would be a problem |
Resolves ros2/build_farmer#237.