Open okellogg opened 4 months ago
For an IDL file named outer-middle-inner.idl with content
outer-middle-inner.idl
module outer { module middle { module inner { enum some_type { A, B, C }; }; }; };
fastddsgen generates the start of header file
#ifndef _FAST_DDS_GENERATED_OUTER-MIDDLE-INNER_H_ #define _FAST_DDS_GENERATED_OUTER-MIDDLE-INNER_H_
Notice that the dashes from the input filename are directly transferred to the header guard symbol. Looking at src/main/java/com/eprosima/fastdds/idl/grammar/Context.java function getHeaderGuardName,
if (m_lastStructure.getHasScope()) { return m_lastStructure.getScope().replaceAll("::", "_").toUpperCase() + "_" + m_fileNameUpper.replaceAll("\\.", "_"); }
IMHO it would be good to extend the pattern in the m_fileNameUpper.replaceAll to include "-".
m_fileNameUpper.replaceAll
For an IDL file named
outer-middle-inner.idl
with contentfastddsgen generates the start of header file
Notice that the dashes from the input filename are directly transferred to the header guard symbol. Looking at src/main/java/com/eprosima/fastdds/idl/grammar/Context.java function getHeaderGuardName,
IMHO it would be good to extend the pattern in the
m_fileNameUpper.replaceAll
to include "-".