1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 23:23:13 +02:00

Allow the patricia tree to store non-pointers

This commit is contained in:
Adam
2010-11-21 00:20:36 -05:00
parent 246f44b988
commit 7790a7f98c
26 changed files with 47 additions and 52 deletions
+2 -7
View File
@@ -35,17 +35,12 @@
* or a range thereof. The first exception that the host matches is the one
* used.
*
* "Session Limiting" is likely to slow down services when there are frequent
* client connects and disconnects. The size of the exception list can also
* play a large role in this performance decrease. It is therefore recommened
* that you keep the number of exceptions to a minimum.
*
* -TheShadow (02 April 1999)
*/
/*************************************************************************/
patricia_tree<Session> SessionList;
patricia_tree<Session *> SessionList;
std::vector<Exception *> exceptions;
@@ -58,7 +53,7 @@ void get_session_stats(long &count, long &mem)
count = SessionList.size();
mem = sizeof(Session) * SessionList.size();
for (patricia_tree<Session>::const_iterator it = SessionList.begin(), it_end = SessionList.end(); it != it_end; ++it)
for (patricia_tree<Session *>::const_iterator it = SessionList.begin(), it_end = SessionList.end(); it != it_end; ++it)
{
Session *session = *it;