summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/CsUtil.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2012-08-10 16:28:35 -0700
committerMark Spruiell <mes@zeroc.com>2012-08-10 16:28:35 -0700
commit964aa286240139ca51486dadefd4debe7cd52991 (patch)
tree37d831468615213d23b490ce8e4c1353048ae817 /cpp/src/Slice/CsUtil.cpp
parentMerge branch 'master' into encoding11 (diff)
downloadice-964aa286240139ca51486dadefd4debe7cd52991.tar.bz2
ice-964aa286240139ca51486dadefd4debe7cd52991.tar.xz
ice-964aa286240139ca51486dadefd4debe7cd52991.zip
implementing preserved slices in C#
Diffstat (limited to 'cpp/src/Slice/CsUtil.cpp')
-rw-r--r--cpp/src/Slice/CsUtil.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp
index 1cd5e3dcec3..5a8c7968b7f 100644
--- a/cpp/src/Slice/CsUtil.cpp
+++ b/cpp/src/Slice/CsUtil.cpp
@@ -609,21 +609,11 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out,
out << nl << "throw new Ice.MarshalException(\"enumerator out of range\");";
out << eb;
}
- out << nl << stream << '.' << func << '(' << cast << param;
- if(!streamingAPI)
- {
- out << ", " << sz;
- }
- out << ");";
+ out << nl << stream << ".writeEnum((int)" << param << ", " << sz << ");";
}
else
{
- out << nl << param << " = " << cast << stream << '.' << func << "(";
- if(!streamingAPI)
- {
- out << sz;
- }
- out << ")" << ';';
+ out << nl << param << " = (" << fixId(en->scoped()) << ')' << stream << ".readEnum(" << sz << ");";
if(streamingAPI)
{
out << nl << "if((int)" << param << " < 0 || (int)" << param << " >= " << sz << ")";