summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/CPlusPlusUtil.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2009-12-11 19:25:23 +0100
committerBenoit Foucher <benoit@zeroc.com>2009-12-11 19:25:23 +0100
commite69c86778ad7d6f473e9f5337a86d657b2b31c74 (patch)
tree0caee55e374ec9ddbde28d16208b08b9d2ec623c /cpp/src/Slice/CPlusPlusUtil.cpp
parentFixed bug in slice compiler that was preventing protobuf from working (diff)
downloadice-e69c86778ad7d6f473e9f5337a86d657b2b31c74.tar.bz2
ice-e69c86778ad7d6f473e9f5337a86d657b2b31c74.tar.xz
ice-e69c86778ad7d6f473e9f5337a86d657b2b31c74.zip
Fixed bug 3409 - Added stream readAndCheckSeqSize method
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.cpp25
1 files changed, 2 insertions, 23 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp
index 8a9854e7dab..ba658453f1a 100644
--- a/cpp/src/Slice/CPlusPlusUtil.cpp
+++ b/cpp/src/Slice/CPlusPlusUtil.cpp
@@ -910,36 +910,15 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string&
// Using alternate sequence type.
//
out << nl << "::Ice::Int __sz_" << fixedParam << ";";
- out << nl << stream << deref << "readSize(__sz_" << fixedParam << ");";
+ out << nl << stream << deref << "readAndCheckSeqSize(" << seq->type()->minWireSize() << ", __sz_"
+ << fixedParam << ");";
out << nl << seqType << "(__sz_" << fixedParam << ").swap(" << fixedParam << ");";
- if(seq->type()->isVariableLength())
- {
- out << nl << stream << deref << "startSeq(__sz_" << fixedParam << ", "
- << seq->type()->minWireSize() << ");";
- }
- else
- {
- out << nl << stream << deref << "checkFixedSeq(__sz_" << fixedParam << ", "
- << seq->type()->minWireSize() << ");";
- }
out << nl << seqType << "::iterator __p_" << fixedParam << ";";
out << nl << "for(__p_" << fixedParam << " = " << fixedParam << ".begin(); __p_" << fixedParam
<< " != " << fixedParam << ".end(); ++__p_" << fixedParam << ")";
out << sb;
writeMarshalUnmarshalCode(out, seq->type(), "(*__p_" + fixedParam + ")", false);
- if(seq->type()->isVariableLength())
- {
- if(!SequencePtr::dynamicCast(seq->type()))
- {
- out << nl << stream << deref << "checkSeq();";
- }
- out << nl << stream << deref << "endElement();";
- }
out << eb;
- if(seq->type()->isVariableLength())
- {
- out << nl << stream << deref << "endSeq(__sz_" << fixedParam << ");";
- }
}
else
{