summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-12-16 16:42:35 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-12-16 16:42:35 +0100
commit711e33b9f8461df55c2fa8e5351769c6e6eb3e0f (patch)
treed7b155f03d9c72974e652d838e5f3c012ce2816c
parentb0676698152d88c76020b0fa51942d7297f152f3 (diff)
Change listmode storage type to vector
-rw-r--r--include/listmode.h2
-rw-r--r--src/listmode.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/listmode.h b/include/listmode.h
index 04044948c..94af1d524 100644
--- a/include/listmode.h
+++ b/include/listmode.h
@@ -37,7 +37,7 @@ class CoreExport ListModeBase : public ModeHandler
/** Items stored in the channel's list
*/
- typedef std::list<ListItem> ModeList;
+ typedef std::vector<ListItem> ModeList;
private:
class ChanData
diff --git a/src/listmode.cpp b/src/listmode.cpp
index 19f2d6061..4e2b95e7d 100644
--- a/src/listmode.cpp
+++ b/src/listmode.cpp
@@ -192,7 +192,7 @@ ModeAction ListModeBase::OnModeChange(User* source, User*, Channel* channel, std
{
if (parameter == it->mask)
{
- cd->list.erase(it);
+ stdalgo::vector::swaperase(cd->list, it);
return MODEACTION_ALLOW;
}
}