@@ -15,10 +15,10 @@ function dumpSwitch(src, enumName, dst) {
15
15
fs . appendFileSync ( dst , ` switch ((${ enumName } )id) {\n` )
16
16
17
17
src . forEach ( ( { name } ) => {
18
- fs . appendFileSync ( dst , ` case ${ enumName } ::${ name } : return "${ name } ";\n` )
18
+ fs . appendFileSync ( dst , ` case ${ enumName } ::${ name } :\n return "${ name } ";\n` )
19
19
} )
20
20
21
- fs . appendFileSync ( dst , ' default: return "UNKNOWN";\n }\n' )
21
+ fs . appendFileSync ( dst , ' default:\n return "UNKNOWN";\n }\n' )
22
22
}
23
23
24
24
function dumpHeader ( { units, abilities, upgrades, buffs, effects } ) {
@@ -36,7 +36,7 @@ utility located at https://github.com/cpp-sc2/codegen
36
36
37
37
#pragma once
38
38
39
- #include "sc2api/ sc2_types.h"
39
+ #include "sc2_types.h"
40
40
41
41
namespace sc2 {
42
42
enum class UNIT_TYPEID;
@@ -45,11 +45,11 @@ enum class UPGRADE_ID;
45
45
enum class BUFF_ID;
46
46
enum class EFFECT_ID;
47
47
48
- typedef SC2Type<UNIT_TYPEID> UnitTypeID ;
49
- typedef SC2Type<ABILITY_ID> AbilityID ;
50
- typedef SC2Type<UPGRADE_ID> UpgradeID ;
51
- typedef SC2Type<BUFF_ID> BuffID ;
52
- typedef SC2Type<EFFECT_ID> EffectID ;
48
+ using UnitTypeID = SC2Type<UNIT_TYPEID>;
49
+ using AbilityID = SC2Type<ABILITY_ID>;
50
+ using UpgradeID = SC2Type<UPGRADE_ID>;
51
+ using BuffID = SC2Type<BUFF_ID>;
52
+ using EffectID = SC2Type<EFFECT_ID>;
53
53
54
54
`
55
55
)
@@ -62,8 +62,7 @@ typedef SC2Type<EFFECT_ID> EffectID;
62
62
63
63
fs . appendFileSync (
64
64
dst ,
65
- `
66
- //! Converts a UNIT_TYPEID into a string of the same name.
65
+ `//! Converts a UNIT_TYPEID into a string of the same name.
67
66
const char* UnitTypeToName(UnitTypeID id);
68
67
69
68
//! Converts a ABILITY_ID into a string of the same name.
@@ -94,7 +93,7 @@ Helper converter functions provided for your convenience.
94
93
Entries in it are generated by a custom utility located at https://github.com/cpp-sc2/codegen
95
94
*/
96
95
97
- #include "sc2api/ sc2_typeenums.h"
96
+ #include "sc2_typeenums.h"
98
97
99
98
namespace sc2 {
100
99
`
0 commit comments