-
Notifications
You must be signed in to change notification settings - Fork 65
Rename enums to avoid collisions with MSVC compiler defines #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Resolves ros2/build_farmer#237. Signed-off-by: Jacob Perron <[email protected]>
Connected to ros-visualization/interactive_markers#49. Signed-off-by: Jacob Perron <[email protected]>
cottsay
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me then.
Connected to ros-visualization/interactive_markers#49. Signed-off-by: Jacob Perron <[email protected]>
|
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.