summaryrefslogtreecommitdiff
path: root/ZAPD/ZResource.cpp
diff options
context:
space:
mode:
authorNicholas Estelami <NEstelami@users.noreply.github.com>2021-11-30 20:09:32 -0500
committerGitHub <noreply@github.com>2021-11-30 20:09:32 -0500
commita3363333d809e8089a55efc3ea32eaea9ddb8d8c (patch)
tree5cf25cc7a7fb5eebd2a1671f0e54a8e3335ebbce /ZAPD/ZResource.cpp
parente3b53d3b8f88a0d139e72602c52666057e7066c0 (diff)
ZResource::GetSourceOutputCode no longer returns a string (#209)
* Updated nuget to use newer version of libpng. Also updated uses of std::filesystem::path to be compliant with MSVC implementation. * Updated nuget to use newer version of libpng. Also updated uses of std::filesystem::path to be compliant with MSVC implementation. * GetSourceOutputCode no longer uses strings, and some overrides were removed. * Removed redundant GetSourceOutputHeader * Fixed MSVC issue * Changed libpng nuget package due to compilation issues. Other minor tweaks. Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com>
Diffstat (limited to 'ZAPD/ZResource.cpp')
-rw-r--r--ZAPD/ZResource.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/ZAPD/ZResource.cpp b/ZAPD/ZResource.cpp
index 4fd6d08..2dfe6d5 100644
--- a/ZAPD/ZResource.cpp
+++ b/ZAPD/ZResource.cpp
@@ -258,18 +258,21 @@ std::string ZResource::GetDefaultName(const std::string& prefix) const
rawDataIndex);
}
-std::string ZResource::GetSourceOutputCode([[maybe_unused]] const std::string& prefix)
+void ZResource::GetSourceOutputCode([[maybe_unused]] const std::string& prefix)
{
std::string bodyStr = GetBodySourceCode();
- Declaration* decl = parent->GetDeclaration(rawDataIndex);
- if (decl == nullptr || decl->isPlaceholder)
- decl = DeclareVar(prefix, bodyStr);
- else
- decl->text = bodyStr;
- decl->staticConf = staticConf;
+ if (bodyStr != "ERROR")
+ {
+ Declaration* decl = parent->GetDeclaration(rawDataIndex);
- return "";
+ if (decl == nullptr || decl->isPlaceholder)
+ decl = DeclareVar(prefix, bodyStr);
+ else
+ decl->text = bodyStr;
+
+ decl->staticConf = staticConf;
+ }
}
std::string ZResource::GetSourceOutputHeader([[maybe_unused]] const std::string& prefix)