summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2004-07-28 02:01:38 +0000
committerMichi Henning <michi@zeroc.com>2004-07-28 02:01:38 +0000
commit2ba59b007740aa3edafc867b6457b8b02b156864 (patch)
tree5f257e812e8b78dd1ed14d6e8c53e3ab0866cc5a /cpp/src
parentFixed bug in slice2cs (multiple sequence members in classes generated (diff)
downloadice-2ba59b007740aa3edafc867b6457b8b02b156864.tar.bz2
ice-2ba59b007740aa3edafc867b6457b8b02b156864.tar.xz
ice-2ba59b007740aa3edafc867b6457b8b02b156864.zip
Oops, got a bit carried away with previous fix. This one should do the
trick.
Diffstat (limited to 'cpp/src')
-rwxr-xr-xcpp/src/Slice/CsUtil.cpp3
-rwxr-xr-xcpp/src/slice2cs/Gen.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp
index ae4575cfe7a..efe16a9162f 100755
--- a/cpp/src/Slice/CsUtil.cpp
+++ b/cpp/src/Slice/CsUtil.cpp
@@ -600,9 +600,10 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
out << sb;
out << nl << "int sz = " << stream << ".readSize();";
out << nl << stream << ".startSeq(sz, " << static_cast<unsigned>(type->minWireSize()) << ");";
+ out << nl << param << " = new ";
if(isArray)
{
- out << nl << param << " = new " << typeS << "[sz]";
+ out << typeS << "[sz]";
}
else
{
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 4640b491018..abfe1de6d59 100755
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -1211,9 +1211,7 @@ Slice::Gen::TypesVisitor::visitClassDefEnd(const ClassDefPtr& p)
patchParams << ", " << classMemberCount++;
}
}
- _out << sb;
writeMarshalUnmarshalCode(_out, (*d)->type(), fixId((*d)->name()), false, false, patchParams.str());
- _out << eb;
}
_out << nl << "__is.endReadSlice();";
_out << nl << "base.__read(__is, true);";