From 7313c3355a3ae9b66ea651c7aed3b68e8a22b8be Mon Sep 17 00:00:00 2001 From: Ramen2X Date: Tue, 19 Mar 2024 15:41:49 -0400 Subject: [PATCH] flip #if case --- src/headergenerator.cpp | 8 ++++---- src/main.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/headergenerator.cpp b/src/headergenerator.cpp index 108237d..1efef53 100644 --- a/src/headergenerator.cpp +++ b/src/headergenerator.cpp @@ -129,8 +129,8 @@ bool HeaderGenerator::WriteHeader(char *p_interleafName, std::map= 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= 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 diff --git a/src/main.cpp b/src/main.cpp index 0e804b9..e237877 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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");