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
|
// This file was generated by: extract_tileset_classes.py
|
||||||
|
|
||||||
#include <breeze.h>
|
#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()}"
|
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__)
|
script_name = os.path.basename(__file__)
|
||||||
print(f"// This file was generated by: {script_name}")
|
print(f"// This file was generated by: {script_name}")
|
||||||
print()
|
print()
|
||||||
@@ -185,3 +189,5 @@ print()
|
|||||||
|
|
||||||
|
|
||||||
# ============================
|
# ============================
|
||||||
|
|
||||||
|
print(f"#endif //{header_guard}")
|
||||||
Reference in New Issue
Block a user