Skip to content

Commit

Permalink
Fixed: Incorrect header definitions
Browse files Browse the repository at this point in the history
If a file had a header name with "-" in the title, would appear as "-" after #ifndef and #define.
For example, filename="derived-module-meimixins.h" would appear as:

#ifndef DERIVED-MODULE-MEIMIXIN_H_
#define DERIVED-MODULE-MEIMIXIN_H_

After this fix, they appear as:

#ifndef DERIVED_MODULE_MEIMIXIN_H_
#define DERIVED_MODULE_MEIMIXIN_H_
  • Loading branch information
ifkarp committed May 12, 2015
1 parent d534770 commit 334212a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/langs/cplusplus.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def __create_mixin_classes(schema, outdir):
tplvars = {
"includes": "",
'license': LICENSE.format(authors=AUTHORS),
'moduleNameCaps': "{0}MIXIN".format(module.upper()),
'moduleNameCaps': "{0}MIXIN".format((module.upper()).replace("-","_")),
'elements': classes.strip()
}
if "std::string" in classes:
Expand Down Expand Up @@ -361,7 +361,7 @@ def __create_element_classes(schema, outdir):
outvars = {
"includes": incl_output,
"license": LICENSE.format(authors=AUTHORS),
"moduleNameCaps": module.upper(),
"moduleNameCaps": (module.upper()).replace("-","_"),
"elements": element_output.strip()
}
if "std::string" in element_output:
Expand Down

0 comments on commit 334212a

Please sign in to comment.