1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 12:25:45 +02:00

Store modules in a list and xlines in a vector, not deques. We need to be able to keep iterators valid.

This commit is contained in:
Adam
2010-06-20 21:33:01 -04:00
parent 0d2d7e9968
commit 17040c088a
7 changed files with 23 additions and 28 deletions
+3 -6
View File
@@ -116,13 +116,10 @@ Module::~Module()
}
}
for (std::deque<Module *>::iterator it = Modules.begin(), it_end = Modules.end(); it != it_end; ++it)
std::list<Module *>::iterator it = std::find(Modules.begin(), Modules.end(), this);
if (it != Modules.end())
{
if (*it == this)
{
Modules.erase(it);
break;
}
Modules.erase(it);
}
}