summaryrefslogtreecommitdiff
path: root/ZAPD/ZFile.cpp
diff options
context:
space:
mode:
authorNicholas Estelami <NEstelami@users.noreply.github.com>2022-08-24 00:08:00 -0400
committerGitHub <noreply@github.com>2022-08-24 00:08:00 -0400
commit9bc6a442d91d698fa16a94f620ac903362d85543 (patch)
treed82bdab483434dedb544590908896ee1da004b0f /ZAPD/ZFile.cpp
parent1a3ea3895a95dd88806908999661e48fe467c172 (diff)
parentbd65788ed221c6725d438f0dac75ce1156e0a7bb (diff)
Merge pull request #257 from louist103/guards
Custom header guard support
Diffstat (limited to 'ZAPD/ZFile.cpp')
-rw-r--r--ZAPD/ZFile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/ZAPD/ZFile.cpp b/ZAPD/ZFile.cpp
index b742b09..6f22c88 100644
--- a/ZAPD/ZFile.cpp
+++ b/ZAPD/ZFile.cpp
@@ -777,10 +777,10 @@ void ZFile::GenerateSourceHeaderFiles()
{
OutputFormatter formatter;
- std::string objectNameUpper = StringHelper::ToUpper(GetName());
+ std::string guard = StringHelper::ToUpper(outName.stem().string());
- formatter.Write(StringHelper::Sprintf("#ifndef %s_H\n#define %s_H 1\n\n",
- objectNameUpper.c_str(), objectNameUpper.c_str()));
+ formatter.Write(
+ StringHelper::Sprintf("#ifndef %s_H\n#define %s_H 1\n\n", guard.c_str(), guard.c_str()));
for (ZResource* res : resources)
{