summaryrefslogtreecommitdiff
path: root/cpp/src/Slice
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Slice')
-rw-r--r--cpp/src/Slice/PythonUtil.cpp32
1 files changed, 8 insertions, 24 deletions
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index 2e714214052..4848dfcbcff 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -2291,14 +2291,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 +2310,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 +2352,7 @@ Slice::Python::CodeVisitor::writeDocstring(const string& comment, const DataMemb
}
}
- _out << "\"\"\"";
+ _out << nl << "\"\"\"";
}
void
@@ -2376,11 +2368,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 +2410,7 @@ Slice::Python::CodeVisitor::writeDocstring(const string& comment, const Enumerat
}
}
- _out << "\"\"\"";
+ _out << nl << "\"\"\"";
}
bool
@@ -2665,11 +2653,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 +2782,7 @@ Slice::Python::CodeVisitor::writeDocstring(const OperationPtr& op, DocstringMode
_out << nl << r->first << " -- " << r->second;
}
}
- _out << "\"\"\"";
+ _out << nl << "\"\"\"";
}
void