summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/PythonUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Slice/PythonUtil.cpp')
-rw-r--r--cpp/src/Slice/PythonUtil.cpp42
1 files changed, 8 insertions, 34 deletions
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index 2e714214052..0caebc4ef4d 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -518,17 +518,7 @@ Slice::Python::CodeVisitor::visitClassDefStart(const ClassDefPtr& p)
//
ClassList allBases = p->allBases();
StringList ids;
-#if defined(__IBMCPP__) && defined(NDEBUG)
-//
-// VisualAge C++ 6.0 does not see that ClassDef is a Contained,
-// when inlining is on. The code below issues a warning: better
-// than an error!
-//
- transform(allBases.begin(), allBases.end(), back_inserter(ids),
- IceUtil::constMemFun<string,ClassDef>(&Contained::scoped));
-#else
transform(allBases.begin(), allBases.end(), back_inserter(ids), IceUtil::constMemFun(&Contained::scoped));
-#endif
StringList other;
other.push_back(scoped);
other.push_back("::Ice::Object");
@@ -2291,14 +2281,10 @@ Slice::Python::CodeVisitor::writeDocstring(const string& comment, const string&
for(StringVec::const_iterator q = lines.begin(); q != lines.end(); ++q)
{
- if(q != lines.begin())
- {
- _out << nl;
- }
- _out << *q;
+ _out << nl << *q;
}
- _out << "\"\"\"";
+ _out << nl << "\"\"\"";
}
void
@@ -2314,11 +2300,7 @@ Slice::Python::CodeVisitor::writeDocstring(const string& comment, const DataMemb
for(StringVec::const_iterator q = lines.begin(); q != lines.end(); ++q)
{
- if(q != lines.begin())
- {
- _out << nl;
- }
- _out << *q;
+ _out << nl << *q;
}
if(!members.empty())
@@ -2360,7 +2342,7 @@ Slice::Python::CodeVisitor::writeDocstring(const string& comment, const DataMemb
}
}
- _out << "\"\"\"";
+ _out << nl << "\"\"\"";
}
void
@@ -2376,11 +2358,7 @@ Slice::Python::CodeVisitor::writeDocstring(const string& comment, const Enumerat
for(StringVec::const_iterator q = lines.begin(); q != lines.end(); ++q)
{
- if(q != lines.begin())
- {
- _out << nl;
- }
- _out << *q;
+ _out << nl << *q;
}
if(!enums.empty())
@@ -2422,7 +2400,7 @@ Slice::Python::CodeVisitor::writeDocstring(const string& comment, const Enumerat
}
}
- _out << "\"\"\"";
+ _out << nl << "\"\"\"";
}
bool
@@ -2665,11 +2643,7 @@ Slice::Python::CodeVisitor::writeDocstring(const OperationPtr& op, DocstringMode
{
for(StringVec::const_iterator q = comment.description.begin(); q != comment.description.end(); ++q)
{
- if(q != comment.description.begin())
- {
- _out << nl;
- }
- _out << *q;
+ _out << nl << *q;
}
}
@@ -2798,7 +2772,7 @@ Slice::Python::CodeVisitor::writeDocstring(const OperationPtr& op, DocstringMode
_out << nl << r->first << " -- " << r->second;
}
}
- _out << "\"\"\"";
+ _out << nl << "\"\"\"";
}
void