summaryrefslogtreecommitdiff
path: root/cpp/src/slice2swift/Gen.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-03-11 13:47:39 +0100
committerJose <jose@zeroc.com>2019-03-11 13:47:39 +0100
commit696e661d5abd68c8a9d1f46b6ae47b179e12b2b5 (patch)
tree6c33e74845fec53882c1783e2957de9641e31d36 /cpp/src/slice2swift/Gen.cpp
parentmove test driver sources to platform specific grou (diff)
downloadice-696e661d5abd68c8a9d1f46b6ae47b179e12b2b5.tar.bz2
ice-696e661d5abd68c8a9d1f46b6ae47b179e12b2b5.tar.xz
ice-696e661d5abd68c8a9d1f46b6ae47b179e12b2b5.zip
More marshalling updates
Diffstat (limited to 'cpp/src/slice2swift/Gen.cpp')
-rw-r--r--cpp/src/slice2swift/Gen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/slice2swift/Gen.cpp b/cpp/src/slice2swift/Gen.cpp
index 7dcca5f90fd..23433c3dd20 100644
--- a/cpp/src/slice2swift/Gen.cpp
+++ b/cpp/src/slice2swift/Gen.cpp
@@ -462,10 +462,10 @@ Gen::TypesVisitor::visitSequence(const SequencePtr& p)
out << nl << "let sz = try istr.readAndCheckSeqSize(minSize: " << p->type()->minWireSize() << ")";
out << nl << "var v = " << name << "()";
out << nl << "v.reserveCapacity(sz)";
- out << nl << "for i in 0 ..< sz";
+ out << nl << "for _ in 0 ..< sz";
out << sb;
writeMarshalUnmarshalCode(out, type, typeToString(p->type(), p), "j", false, true, false);
- out << nl << "v[i] = j";
+ out << nl << "v.append(j)";
out << eb;
out << nl << "return v";
out << eb;