Make warning disappear (#957)
This commit is contained in:
parent
58db814d72
commit
bddc698295
|
@ -7,7 +7,7 @@ int main()
|
|||
items.push_back(3);
|
||||
std::vector<int>::iterator iter;
|
||||
for (iter = items.begin(); iter != items.end(); ++iter) {
|
||||
if (true) {
|
||||
if (*iter == 2) {
|
||||
items.erase(iter);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ int main()
|
|||
items.push_back(3);
|
||||
std::vector<int>::iterator iter;
|
||||
for (iter = items.begin(); iter != items.end();) {
|
||||
if (true) {
|
||||
if (*iter == 2) {
|
||||
iter = items.erase(iter);
|
||||
} else {
|
||||
++iter;
|
||||
|
|
Loading…
Reference in New Issue