mirror of
https://github.com/isledecomp/actionheadergen.git
synced 2024-11-22 23:37:59 -05:00
flip #if case
This commit is contained in:
parent
b29a34cf3f
commit
7313c3355a
2 changed files with 5 additions and 5 deletions
|
@ -129,8 +129,8 @@ bool HeaderGenerator::WriteHeader(char *p_interleafName, std::map<size_t, std::s
|
|||
m_declFout << "namespace " << m_normalizedInlfName << "Script\n{\n";
|
||||
|
||||
// add ifdefs for conditional compilation (decomp requirement)
|
||||
m_fout << "#if __cplusplus < 201103L\nenum Script : int {\n#else\n";
|
||||
m_declFout << "#if __cplusplus < 201103L\nenum Script : int;\n#else\n";
|
||||
m_fout << "#if __cplusplus >= 201103L\nenum Script : int {\n#else\n";
|
||||
m_declFout << "#if __cplusplus >= 201103L\nenum Script : int;\n#else\n";
|
||||
|
||||
// declare enum
|
||||
m_fout << "enum Script {\n#endif\n";
|
||||
|
@ -154,8 +154,8 @@ bool HeaderGenerator::WriteHeader(char *p_interleafName, std::map<size_t, std::s
|
|||
if (i == 2000) {
|
||||
// some compilers don't accept extremely large enums,
|
||||
// so we split them up here in case of 2000+ entries
|
||||
m_fout << "};\n\n#if __cplusplus < 201103L\nenum Script2 : int {\n#else\nenum Script2 {\n#endif\n";
|
||||
m_declFout << "\n#if __cplusplus < 201103L\nenum Script2 : int;\n#else\nenum Script2;\n#endif\n";
|
||||
m_fout << "};\n\n#if __cplusplus >= 201103L\nenum Script2 : int {\n#else\nenum Script2 {\n#endif\n";
|
||||
m_declFout << "\n#if __cplusplus >= 201103L\nenum Script2 : int;\n#else\nenum Script2;\n#endif\n";
|
||||
}
|
||||
|
||||
// actually write the enum entry
|
||||
|
|
|
@ -140,7 +140,7 @@ int main(int argc, char *argv[])
|
|||
printf("Successfully generated header for %s\n", filename);
|
||||
}
|
||||
|
||||
hgenerator.m_declFout << "#endif // ACTIONSFWD_H";
|
||||
hgenerator.m_declFout << "#endif // ACTIONSFWD_H\n";
|
||||
hgenerator.m_declFout.close();
|
||||
|
||||
printf("Finished!\n");
|
||||
|
|
Loading…
Reference in a new issue