summaryrefslogtreecommitdiff
path: root/src/module.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-06-20 21:33:01 -0400
committerAdam <Adam@anope.org>2010-06-20 21:33:01 -0400
commit17040c088a00a83094359382b9add202e3749db7 (patch)
treed4671d12949c363f3b81cd5bacce38b2c18f75c5 /src/module.cpp
parent0d2d7e996835c8c77c1eee5a4c90c3e2a60be4ff (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.cpp9
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);
}
}