summaryrefslogtreecommitdiff
path: root/cpp/src/slice2swift/Gen.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-04-03 15:08:27 +0200
committerJose <jose@zeroc.com>2019-04-03 15:08:27 +0200
commitadec71218c1503663a371ea7cf30ea9068f95eb9 (patch)
treefcd2af866ee6d85d90bd231c1386c0aedeccd64f /cpp/src/slice2swift/Gen.cpp
parentFixes for optional marshalling unmarshalling (diff)
downloadice-adec71218c1503663a371ea7cf30ea9068f95eb9.tar.bz2
ice-adec71218c1503663a371ea7cf30ea9068f95eb9.tar.xz
ice-adec71218c1503663a371ea7cf30ea9068f95eb9.zip
Fixes for optional marshalling unmarshalling
Diffstat (limited to 'cpp/src/slice2swift/Gen.cpp')
-rw-r--r--cpp/src/slice2swift/Gen.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/slice2swift/Gen.cpp b/cpp/src/slice2swift/Gen.cpp
index 51febc811c6..03b8b97bb0b 100644
--- a/cpp/src/slice2swift/Gen.cpp
+++ b/cpp/src/slice2swift/Gen.cpp
@@ -549,12 +549,14 @@ Gen::TypesVisitor::visitStructStart(const StructPtr& p)
if(p->isVariableLength())
{
out << nl << "let pos = startSize()";
+ out << nl << "write(v)";
+ out << nl << "endSize(position: pos)";
}
else
{
out << nl << "write(size: " << p->minWireSize() << ")";
+ out << nl << "write(v)";
}
- out << nl << "write(v)";
out << eb;
out << eb;
out << eb;