diff options
author | Jose <jose@zeroc.com> | 2013-01-25 20:26:51 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2013-01-25 20:26:51 +0100 |
commit | 2271900e67c2503ed7e05dbfb33174719251cc3f (patch) | |
tree | 9e530916844600406ccc8415795d485e738e9d87 /cpp/src/Slice/CPlusPlusUtil.cpp | |
parent | IceGridGUI minor fix (diff) | |
download | ice-2271900e67c2503ed7e05dbfb33174719251cc3f.tar.bz2 ice-2271900e67c2503ed7e05dbfb33174719251cc3f.tar.xz ice-2271900e67c2503ed7e05dbfb33174719251cc3f.zip |
Fixed (ICE-4842) - cpp::array unused parameter in generated async callbacks
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r-- | cpp/src/Slice/CPlusPlusUtil.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 6aa2416f3f3..ed5820ac9bc 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -126,7 +126,7 @@ dictionaryTypeToString(const DictionaryPtr& dict, const StringList& metaData, in void writeParamAllocateCode(Output& out, const TypePtr& type, bool optional, const string& fixedName, - const StringList& metaData, int typeCtx) + const StringList& metaData, int typeCtx, bool endArg) { string s = typeToString(type, metaData, typeCtx); if(optional) @@ -135,7 +135,7 @@ writeParamAllocateCode(Output& out, const TypePtr& type, bool optional, const st } out << nl << s << ' ' << fixedName << ';'; - if(!(typeCtx & TypeContextInParam)) + if(!(typeCtx & TypeContextInParam) || !endArg) { return; // We're done. } @@ -946,11 +946,13 @@ Slice::writeAllocateCode(Output& out, const ParamDeclList& params, const Operati { for(ParamDeclList::const_iterator p = params.begin(); p != params.end(); ++p) { - writeParamAllocateCode(out, (*p)->type(), (*p)->optional(), fixKwd((*p)->name()), (*p)->getMetaData(), typeCtx); + writeParamAllocateCode(out, (*p)->type(), (*p)->optional(), fixKwd((*p)->name()), (*p)->getMetaData(), typeCtx, + getEndArg((*p)->type(),(*p)->getMetaData(), (*p)->name()) != (*p)->name()); } if(op && op->returnType()) - { - writeParamAllocateCode(out, op->returnType(), op->returnIsOptional(), "__ret", op->getMetaData(), typeCtx); + { + writeParamAllocateCode(out, op->returnType(), op->returnIsOptional(), "__ret", op->getMetaData(), typeCtx, + getEndArg(op->returnType(), op->getMetaData(), "__ret") != "__ret"); } } |