diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2006-01-30 13:35:54 +0000 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2006-01-30 13:35:54 +0000 |
commit | ec35e73083a6a706cedcdf28fbe76a0eba9fe332 (patch) | |
tree | 6b560ba1f08591895900e541041d3aeeacaff358 /cpp/src/Slice/CPlusPlusUtil.cpp | |
parent | Minor fixes to previous fix (diff) | |
download | ice-ec35e73083a6a706cedcdf28fbe76a0eba9fe332.tar.bz2 ice-ec35e73083a6a706cedcdf28fbe76a0eba9fe332.tar.xz ice-ec35e73083a6a706cedcdf28fbe76a0eba9fe332.zip |
Make alternate sequence class not require template
Diffstat (limited to 'cpp/src/Slice/CPlusPlusUtil.cpp')
-rw-r--r-- | cpp/src/Slice/CPlusPlusUtil.cpp | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp index 044ede63821..b7880b4ac46 100644 --- a/cpp/src/Slice/CPlusPlusUtil.cpp +++ b/cpp/src/Slice/CPlusPlusUtil.cpp @@ -159,22 +159,17 @@ Slice::typeToString(const TypePtr& type, const StringList& metaData) if(seq) { string seqType = findMetaData(metaData); - if(seqType.empty()) - { - StringList l = seq->getMetaData(); - seqType = findMetaData(l); - } if(!seqType.empty()) { - TypePtr elemType = seq->type(); - string s = typeToString(elemType); if(seqType == "array") { + TypePtr elemType = seq->type(); + string s = typeToString(elemType); return "::std::pair<const " + s + "*, const " + s + "*>"; } else { - return seqType + "<" + (s[0] == ':' ? " " : "") + s + ">"; + return seqType; } } else @@ -255,22 +250,17 @@ Slice::inputTypeToString(const TypePtr& type, const StringList& metaData) if(seq) { string seqType = findMetaData(metaData); - if(seqType.empty()) - { - StringList l = seq->getMetaData(); - seqType = findMetaData(l); - } if(!seqType.empty()) { - TypePtr elemType = seq->type(); - string s = typeToString(elemType); if(seqType == "array") { + TypePtr elemType = seq->type(); + string s = typeToString(elemType); return "const ::std::pair<const " + s + "*, const " + s + "*>&"; } else { - return "const " + seqType + "<" + (s[0] == ':' ? " " : "") + s + ">&"; + return "const " + seqType + "&"; } } else @@ -328,16 +318,9 @@ Slice::outputTypeToString(const TypePtr& type, const StringList& metaData) if(seq) { string seqType = findMetaData(metaData); - if(seqType.empty()) - { - StringList l = seq->getMetaData(); - seqType = findMetaData(l); - } if(!seqType.empty() && seqType != "array") { - TypePtr elemType = seq->type(); - string s = typeToString(elemType); - return seqType + "<" + (s[0] == ':' ? " " : "") + s + ">&"; + return seqType + "&"; } else { |