summaryrefslogtreecommitdiff
path: root/src/Companion.cpp
diff options
context:
space:
mode:
authorKiritoDv <kiritodev01@gmail.com>2024-06-09 00:50:45 -0600
committerKiritoDv <kiritodev01@gmail.com>2024-06-09 00:50:45 -0600
commit0153dd0329549e66c2373cfe4b96063a3790d35a (patch)
tree26b01b3b56c126a6b7553f5f520653b62242b52b /src/Companion.cpp
parent521452cb6aea6034859546dffb0bc18d3880d4db (diff)
Fixed GeoLayout Processing
Diffstat (limited to 'src/Companion.cpp')
-rw-r--r--src/Companion.cpp12
1 files changed, 9 insertions, 3 deletions
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;