diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2022-01-11 21:55:18 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-11 19:55:18 -0500 |
| commit | bf16ff7c4c409358a53793b72260b1d8e474cf0c (patch) | |
| tree | fa4d2d0169b5485f990112642df9b57b388af14b /ZAPD/ZArray.cpp | |
| parent | 16b53763423c6830a6fecef5579a2013c54abbd1 (diff) | |
ZPointer (#232)
* ZPointer
* Add docs
* format
* jenkins file for mm
* whoops
* Rewrite as a switch
* a
Diffstat (limited to 'ZAPD/ZArray.cpp')
| -rw-r--r-- | ZAPD/ZArray.cpp | 13 |
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"; |
