summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/PythonUtil.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-06-22 00:29:53 +0200
committerJose <jose@zeroc.com>2019-06-22 00:29:53 +0200
commitc5959fd09de61604bedd75354401df6a57395d65 (patch)
tree3b0227f631c8b20fb1a1a274b92f63f52f34af2c /cpp/src/Slice/PythonUtil.cpp
parentSmall fix (diff)
parentEnable -Wconversion with clang - Close #363 (diff)
downloadice-c5959fd09de61604bedd75354401df6a57395d65.tar.bz2
ice-c5959fd09de61604bedd75354401df6a57395d65.tar.xz
ice-c5959fd09de61604bedd75354401df6a57395d65.zip
Merge remote-tracking branch 'origin/3.7' into swift
Diffstat (limited to 'cpp/src/Slice/PythonUtil.cpp')
-rw-r--r--cpp/src/Slice/PythonUtil.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp
index 8e95f47b753..83d8a8341d3 100644
--- a/cpp/src/Slice/PythonUtil.cpp
+++ b/cpp/src/Slice/PythonUtil.cpp
@@ -2486,10 +2486,10 @@ Slice::Python::CodeVisitor::parseOpComment(const string& comment, OpComment& c)
//
string name;
bool inParam = false, inException = false, inReturn = false;
- vector<string>::size_type i = 0;
- while(i < lines.size())
+ vector<string>::iterator i = lines.begin();
+ while(i != lines.end())
{
- string l = lines[i];
+ string l = *i;
string::size_type paramTag = l.find("@param");
string::size_type throwTag = l.find("@throw");
string::size_type returnTag = l.find("@return");
@@ -2533,7 +2533,7 @@ Slice::Python::CodeVisitor::parseOpComment(const string& comment, OpComment& c)
}
}
}
- lines.erase(lines.begin() + i);
+ i = lines.erase(i);
continue;
}
else if(throwTag != string::npos)
@@ -2575,7 +2575,7 @@ Slice::Python::CodeVisitor::parseOpComment(const string& comment, OpComment& c)
}
}
}
- lines.erase(lines.begin() + i);
+ i = lines.erase(i);
continue;
}
else if(returnTag != string::npos)
@@ -2592,7 +2592,7 @@ Slice::Python::CodeVisitor::parseOpComment(const string& comment, OpComment& c)
inParam = false;
c.returns = l.substr(pos);
}
- lines.erase(lines.begin() + i);
+ i = lines.erase(i);
continue;
}
else
@@ -2612,7 +2612,7 @@ Slice::Python::CodeVisitor::parseOpComment(const string& comment, OpComment& c)
c.params[name] += " ";
}
c.params[name] += l.substr(pos);
- lines.erase(lines.begin() + i);
+ i = lines.erase(i);
continue;
}
else if(inException)
@@ -2623,7 +2623,7 @@ Slice::Python::CodeVisitor::parseOpComment(const string& comment, OpComment& c)
c.exceptions[name] += " ";
}
c.exceptions[name] += l.substr(pos);
- lines.erase(lines.begin() + i);
+ i = lines.erase(i);
continue;
}
else if(inReturn)
@@ -2633,7 +2633,7 @@ Slice::Python::CodeVisitor::parseOpComment(const string& comment, OpComment& c)
c.returns += " ";
}
c.returns += l.substr(pos);
- lines.erase(lines.begin() + i);
+ i = lines.erase(i);
continue;
}
}