diff options
author | Adam <Adam@anope.org> | 2010-06-20 21:33:01 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2010-06-20 21:33:01 -0400 |
commit | 17040c088a00a83094359382b9add202e3749db7 (patch) | |
tree | d4671d12949c363f3b81cd5bacce38b2c18f75c5 /src/module.cpp | |
parent | 0d2d7e996835c8c77c1eee5a4c90c3e2a60be4ff (diff) |
Store modules in a list and xlines in a vector, not deques. We need to be able to keep iterators valid.
Diffstat (limited to 'src/module.cpp')
-rw-r--r-- | src/module.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/module.cpp b/src/module.cpp index df50b63d1..7f9e7fd0d 100644 --- a/src/module.cpp +++ b/src/module.cpp @@ -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); } } |