From 0153dd0329549e66c2373cfe4b96063a3790d35a Mon Sep 17 00:00:00 2001 From: KiritoDv Date: Sun, 9 Jun 2024 00:50:45 -0600 Subject: Fixed GeoLayout Processing --- src/Companion.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/Companion.cpp') diff --git a/src/Companion.cpp b/src/Companion.cpp index 5776ae5..a797ee4 100644 --- a/src/Companion.cpp +++ b/src/Companion.cpp @@ -922,13 +922,19 @@ void Companion::ProcessFile(YAML::Node root) { fs::path entryPath = this->gCurrentFile; std::string symbol = entryPath.stem().string(); std::transform(symbol.begin(), symbol.end(), symbol.begin(), toupper); - file << "#ifndef " << symbol << "_H" << std::endl; - file << "#define " << symbol << "_H" << std::endl << std::endl; + if(this->IsOTRMode()){ + file << "#pragma once\n\n"; + } else { + file << "#ifndef " << symbol << "_H" << std::endl; + file << "#define " << symbol << "_H" << std::endl << std::endl; + } if(!this->gFileHeader.empty()) { file << this->gFileHeader << std::endl; } file << buffer; - file << std::endl << "#endif" << std::endl; + if(!this->IsOTRMode()){ + file << std::endl << "#endif" << std::endl; + } } else { if(!this->gFileHeader.empty()) { file << this->gFileHeader << std::endl; -- cgit v1.2.3