summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/CPlusPlusUtil.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2012-03-05 15:20:12 +0100
committerBenoit Foucher <benoit@zeroc.com>2012-03-05 15:20:12 +0100
commit279cc589ece5abaeb735974e799c809227e0aa83 (patch)
tree186204caab0ce3d9cf39a5f09736e6b750e95b67 /cpp/src/Slice/CPlusPlusUtil.cpp
parentFixed copy/paste error for reading replica cert CN property (diff)
downloadice-279cc589ece5abaeb735974e799c809227e0aa83.tar.bz2
ice-279cc589ece5abaeb735974e799c809227e0aa83.tar.xz
ice-279cc589ece5abaeb735974e799c809227e0aa83.zip
ICE-4793 - Fixes to prevent GCC shadow warnings and other minor fixes
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp
index 0d5024d9d91..fe0f9aa7d23 100644
--- a/cpp/src/Slice/CPlusPlusUtil.cpp
+++ b/cpp/src/Slice/CPlusPlusUtil.cpp
@@ -576,11 +576,9 @@ Slice::fixKwd(const string& name)
}
void
-Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& param, bool marshal,
+Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& fixedParam, bool marshal,
const string& str, bool pointer, const StringList& metaData, int typeCtx)
{
- string fixedParam = fixKwd(param);
-
string stream;
if(str.empty())
{
@@ -686,7 +684,7 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string&
if(marshal)
{
- string seqType = findMetaData(metaData, typeCtx);
+ string seqType = findMetaData(metaData, typeCtx);
string scope = fixKwd(seq->scope());
if(seqType == "array" || seqType == "range:array")
@@ -751,7 +749,7 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string&
<< fixedParam << ".first; ___" << fixedParam << " != " << fixedParam << ".second; ++___"
<< fixedParam << ")";
out << sb;
- writeMarshalUnmarshalCode(out, seq->type(), "(*___" + fixedParam + ")", true, "", true, l, false);
+ writeMarshalUnmarshalCode(out, seq->type(), "(*___" + fixedParam + ")", true, "", true, l);
out << eb;
}
else if(!seqType.empty())
@@ -810,7 +808,7 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string&
}
else
{
- string seqType = findMetaData(metaData, typeCtx);
+ string seqType = findMetaData(metaData, typeCtx);
string scope = fixKwd(seq->scope());
if(seqType == "array" || seqType == "range:array")
{
@@ -832,7 +830,7 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string&
StringList l;
l.push_back("cpp:type:" + seqType);
out << nl << seqType << " ___" << fixedParam << ";";
- writeMarshalUnmarshalCode(out, seq, "___" + fixedParam, false, "", true, l, false);
+ writeMarshalUnmarshalCode(out, seq, "___" + fixedParam, false, "", true, l);
}
}
else if(builtin->kind() == Builtin::KindByte)
@@ -896,11 +894,11 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string&
}
if(typeCtx & TypeContextAMIPrivateEnd)
{
- writeMarshalUnmarshalCode(out, seq, fixedParam, false, "", true, md, false);
+ writeMarshalUnmarshalCode(out, seq, fixedParam, false, "", true, md);
}
else
{
- writeMarshalUnmarshalCode(out, seq, "___" + fixedParam, false, "", true, md, false);
+ writeMarshalUnmarshalCode(out, seq, "___" + fixedParam, false, "", true, md);
out << nl << fixedParam << ".first = ___" << fixedParam << ".begin();";
out << nl << fixedParam << ".second = ___" << fixedParam << ".end();";
}
@@ -1005,7 +1003,7 @@ Slice::writeMarshalCode(Output& out, const ParamDeclList& params, const TypePtr&
}
if(ret)
{
- writeMarshalUnmarshalCode(out, ret, "__ret", true, "", true, metaData, false);
+ writeMarshalUnmarshalCode(out, ret, "__ret", true, "", true, metaData);
}
}
@@ -1015,7 +1013,7 @@ Slice::writeUnmarshalCode(Output& out, const ParamDeclList& params, const TypePt
{
for(ParamDeclList::const_iterator p = params.begin(); p != params.end(); ++p)
{
- writeMarshalUnmarshalCode(out, (*p)->type(), fixKwd((*p)->name()), false, "", true, (*p)->getMetaData(),
+ writeMarshalUnmarshalCode(out, (*p)->type(), fixKwd((*p)->name()), false, "", true, (*p)->getMetaData(),
typeCtx);
}
if(ret)
@@ -1236,7 +1234,7 @@ Slice::writeEndCode(Output& out, const ParamDeclList& params, const TypePtr& ret
}
if(ret)
{
- writeParamEndCode(out, ret, "__ret", metaData);
+ writeParamEndCode(out, ret, "__ret", metaData);
}
}