You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The macro draw defined in the XMLParserCommon.h should be renamed to not replace code of other libraries. #defines do not take into account the namespace in which they were defined. Thus the macro is defined globally. Since it is a very generic name this can lead to problems if your own code or other libraries use the word draw in their code.
As discussed in issue #1997 this macro was clashing with function from the Gtk3 UI library. As it is not needed it was proposed by MiguelCompany to remove it.
Signed-off-by: Simon Schaefer <simon.schaefer@rwth-aachen.de>
General Problem
The macro
draw
defined in theXMLParserCommon.h
should be renamed to not replace code of other libraries. #defines do not take into account the namespace in which they were defined. Thus the macro is defined globally. Since it is a very generic name this can lead to problems if your own code or other libraries use the worddraw
in their code.Link to the file in question: https://github.com/eProsima/Fast-DDS/blob/master/include/fastrtps/xmlparser/XMLParserCommon.h
Link to a stack overflow discussion about the issue with macros and namespaces: https://stackoverflow.com/questions/1088290/define-statements-within-a-namespace
Known libraries that have a naming clash
Suggested solution
Rename the macro so that it follows the structure of the namespaces.
Old Code
New Code
The text was updated successfully, but these errors were encountered: