Add header guards
This commit is contained in:
@@ -40,6 +40,10 @@ def enum_string(name):
|
||||
return f"{enum_name}_{name.upper()}"
|
||||
|
||||
|
||||
# ============================
|
||||
header_guard = f"{enum_type.capitalize()}_H"
|
||||
print(f"#ifndef {header_guard}")
|
||||
print(f"#define {header_guard}")
|
||||
script_name = os.path.basename(__file__)
|
||||
print(f"// This file was generated by: {script_name}")
|
||||
print()
|
||||
@@ -185,3 +189,5 @@ print()
|
||||
|
||||
|
||||
# ============================
|
||||
|
||||
print(f"#endif //{header_guard}")
|
||||
Reference in New Issue
Block a user