diff options
Diffstat (limited to 'cpp/src/Slice/CsUtil.cpp')
-rw-r--r-- | cpp/src/Slice/CsUtil.cpp | 14 |
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 << ")"; |