From: w00t Date: Sun, 28 Dec 2008 03:27:28 +0000 (+0000) Subject: Change a few bits to use std::list instead of std::vector. X-Git-Tag: v2.0.23~2231 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=376a2833d9274a83e3571da1b69ce2768a7c8bac;p=user%2Fhenk%2Fcode%2Finspircd.git Change a few bits to use std::list instead of std::vector. Vector is better than list, unless: - you require random access (these don't) - you require that the memory they are stored in are contiguous (these don't) This will save a couple of bytes here and there perhaps (along with much less problems with memory fragmentation and allocation). git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10923 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/include/channels.h b/include/channels.h index 9c231008a..748f6c24b 100644 --- a/include/channels.h +++ b/include/channels.h @@ -58,7 +58,7 @@ class BanItem : public HostItem /** Holds a complete ban list */ -typedef std::vector BanList; +typedef std::list BanList; /** A list of users on a channel */ diff --git a/include/inspircd.h b/include/inspircd.h index 85c2f62e6..b55401e43 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include diff --git a/include/u_listmode.h b/include/u_listmode.h index 6e654f64f..738eddeb0 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -44,10 +44,10 @@ public: /** Items stored in the channel's list */ -typedef std::vector modelist; +typedef std::list modelist; /** Max items per channel by name */ -typedef std::vector limitlist; +typedef std::list limitlist; /** A request used to check if a user is on a channel's list or not */