itemisCREATE / statecharts

YAKINDU Statechart Tools (http://www.statecharts.org)
Eclipse Public License 1.0
174 stars 84 forks source link

Only generate includes when used #2388

Closed andreasmuelder closed 5 years ago

andreasmuelder commented 5 years ago

for C and C++, the headers 'stdlib.h' and 'string.h' are generated as includes into the C Module:

#include <stdlib.h>
#include <string.h>

We should only generate those includes if they are required

andreasmuelder commented 5 years ago

Is it sufficient to always include the headers when the String / Char type is used in the statechart?

terfloth commented 5 years ago

So the issue should be fixed in the following way for the C and C++ code generators independently:

terfloth commented 5 years ago

@BeckmaR - please fix this issue.