summaryrefslogtreecommitdiff
path: root/src/operserv.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/operserv.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/operserv.cpp')
-rw-r--r--src/operserv.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/operserv.cpp b/src/operserv.cpp
index c5e251d1a..8c5a0f9ef 100644
--- a/src/operserv.cpp
+++ b/src/operserv.cpp
@@ -272,10 +272,10 @@ const size_t XLineManager::GetCount() const
return XLines.size();
}
-/** Get the XLine list
- * @return The list
+/** Get the XLine vector
+ * @return The vecotr
*/
-const std::deque<XLine *>& XLineManager::GetList() const
+const std::vector<XLine *>& XLineManager::GetList() const
{
return XLines;
}
@@ -294,7 +294,7 @@ void XLineManager::AddXLine(XLine *x)
*/
bool XLineManager::DelXLine(XLine *x)
{
- std::deque<XLine *>::iterator it = std::find(XLines.begin(), XLines.end(), x);
+ std::vector<XLine *>::iterator it = std::find(XLines.begin(), XLines.end(), x);
if (it != XLines.end())
{
@@ -319,11 +319,11 @@ XLine *XLineManager::GetEntry(unsigned index) const
return XLines[index];
}
-/** Clear the XLine list
+/** Clear the XLine vector
*/
void XLineManager::Clear()
{
- for (std::deque<XLine *>::iterator it = XLines.begin(), it_end = XLines.end(); it != it_end; ++it)
+ for (std::vector<XLine *>::iterator it = XLines.begin(), it_end = XLines.end(); it != it_end; ++it)
delete *it;
XLines.clear();
}
@@ -424,7 +424,7 @@ XLine *XLineManager::Check(User *u)
{
const time_t now = time(NULL);
- for (std::deque<XLine *>::iterator it = XLines.begin(), it_end = XLines.end(); it != it_end; ++it)
+ for (std::vector<XLine *>::iterator it = XLines.begin(), it_end = XLines.end(); it != it_end; ++it)
{
XLine *x = *it;
@@ -727,7 +727,7 @@ bool SQLineManager::Check(Channel *c)
{
if (ircd->chansqline && SQLine)
{
- for (std::deque<XLine *>::const_iterator it = SGLine->GetList().begin(), it_end = SGLine->GetList().end(); it != it_end; ++it)
+ for (std::vector<XLine *>::const_iterator it = SGLine->GetList().begin(), it_end = SGLine->GetList().end(); it != it_end; ++it)
{
XLine *x = *it;