Add header guards
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#ifndef Buildingtype_H
|
||||
#define Buildingtype_H
|
||||
// This file was generated by: extract_tileset_classes.py
|
||||
|
||||
#include <breeze.h>
|
||||
@@ -258,3 +260,4 @@ static void getBuildingSize(BuildingType type, BzTile *outWidth, BzTile *outHeig
|
||||
}
|
||||
}
|
||||
|
||||
#endif //Buildingtype_H
|
||||
|
||||
@@ -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