summaryrefslogtreecommitdiff
path: root/ZAPD/ZArray.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ZAPD/ZArray.cpp')
-rw-r--r--ZAPD/ZArray.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/ZAPD/ZArray.cpp b/ZAPD/ZArray.cpp
index ebfb13e..b6d9e50 100644
--- a/ZAPD/ZArray.cpp
+++ b/ZAPD/ZArray.cpp
@@ -101,11 +101,18 @@ std::string ZArray::GetBodySourceCode() const
const auto& res = resList[i];
output += "\t";
- if (res->GetResourceType() == ZResourceType::Scalar ||
- res->GetResourceType() == ZResourceType::Vertex)
+ switch (res->GetResourceType())
+ {
+ case ZResourceType::Pointer:
+ case ZResourceType::Scalar:
+ case ZResourceType::Vertex:
output += resList.at(i)->GetBodySourceCode();
- else
+ break;
+
+ default:
output += StringHelper::Sprintf("{ %s }", resList.at(i)->GetBodySourceCode().c_str());
+ break;
+ }
if (i < arrayCnt - 1 || res->IsExternalResource())
output += ",\n";