diff options
author | Jose <jose@zeroc.com> | 2019-03-11 13:47:39 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2019-03-11 13:47:39 +0100 |
commit | 696e661d5abd68c8a9d1f46b6ae47b179e12b2b5 (patch) | |
tree | 6c33e74845fec53882c1783e2957de9641e31d36 /cpp/src/slice2swift/Gen.cpp | |
parent | move test driver sources to platform specific grou (diff) | |
download | ice-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.cpp | 4 |
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; |