diff options
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r-- | cpp/src/Slice/CPlusPlusUtil.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 7eda347454b..95ee1fbdb1c 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -856,6 +856,11 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& StringList md; md.push_back("cpp:array"); string tmpParam = "___"; + + // + // Catch some case in which it is not possible to just prepend + // underscores to param to use as temporary variable. + // if(fixedParam.find("(*") == 0) { tmpParam += fixedParam.substr(2, fixedParam.length() - 3); @@ -864,6 +869,10 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string& { tmpParam += fixedParam.substr(0, fixedParam.length() - 3); } + else if(fixedParam.find("->second") != string::npos) + { + tmpParam += fixedParam.substr(0, fixedParam.length() - 8); + } else { tmpParam += fixedParam; |