summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-28 19:06:15 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-28 19:06:15 +0000
commit2ccbc50453f3e70397299b83ba28d0289535b947 (patch)
tree0d4fbce97f3dd55fd64f9c9e210e2f4f374777ab /src
parentb37ec974ee20b943a9129ae054390a565c49bd3c (diff)
(Om, this commit is safe): remove references to DELETE() macro, revert back to delete. Nobody used this most of the time, it had no real purpose, etc.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7972 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/cmd_whowas.cpp28
-rw-r--r--src/modules.cpp6
2 files changed, 22 insertions, 12 deletions
diff --git a/src/cmd_whowas.cpp b/src/cmd_whowas.cpp
index f69d3ee32..1531f6239 100644
--- a/src/cmd_whowas.cpp
+++ b/src/cmd_whowas.cpp
@@ -155,16 +155,18 @@ void cmd_whowas::AddToWhoWas(userrec* user)
if (iter != whowas.end())
{
whowas_set* n = (whowas_set*)iter->second;
+
if (n->size())
{
while (n->begin() != n->end())
{
WhoWasGroup *a = *(n->begin());
- DELETE(a);
+ delete a;
n->pop_front();
}
}
- DELETE(n);
+
+ delete n;
whowas.erase(iter);
}
whowas_fifo.pop_front();
@@ -179,7 +181,7 @@ void cmd_whowas::AddToWhoWas(userrec* user)
if ((int)(group->size()) > ServerInstance->Config->WhoWasGroupSize)
{
WhoWasGroup *a = (WhoWasGroup*)*(group->begin());
- DELETE(a);
+ delete a;
group->pop_front();
}
}
@@ -201,6 +203,7 @@ void cmd_whowas::PruneWhoWas(time_t t)
if (fifosize > maxgroups || whowas_fifo[0].first < t - maxkeep)
{
iter = whowas.find(whowas_fifo[0].second);
+
/* hopefully redundant integrity check, but added while debugging r6216 */
if (iter == whowas.end())
{
@@ -208,17 +211,20 @@ void cmd_whowas::PruneWhoWas(time_t t)
ServerInstance->Log(DEFAULT, "BUG: Whowas maps got corrupted! (1)");
return;
}
+
whowas_set* n = (whowas_set*)iter->second;
+
if (n->size())
{
while (n->begin() != n->end())
{
WhoWasGroup *a = *(n->begin());
- DELETE(a);
+ delete a;
n->pop_front();
}
}
- DELETE(n);
+
+ delete n;
whowas.erase(iter);
whowas_fifo.pop_front();
}
@@ -245,7 +251,7 @@ void cmd_whowas::PruneWhoWas(time_t t)
while (n->begin() != n->end() && nickcount > groupsize)
{
WhoWasGroup *a = *(n->begin());
- DELETE(a);
+ delete a;
n->pop_front();
nickcount--;
}
@@ -264,7 +270,7 @@ void cmd_whowas::MaintainWhoWas(time_t t)
while ((n->begin() != n->end()) && ((*n->begin())->signon < t - ServerInstance->Config->WhoWasMaxKeep))
{
WhoWasGroup *a = *(n->begin());
- DELETE(a);
+ delete a;
n->erase(n->begin());
}
}
@@ -283,6 +289,7 @@ cmd_whowas::~cmd_whowas()
while ((fifosize = (int)whowas_fifo.size()) > 0)
{
iter = whowas.find(whowas_fifo[0].second);
+
/* hopefully redundant integrity check, but added while debugging r6216 */
if (iter == whowas.end())
{
@@ -290,17 +297,20 @@ cmd_whowas::~cmd_whowas()
ServerInstance->Log(DEFAULT, "BUG: Whowas maps got corrupted! (3)");
return;
}
+
whowas_set* n = (whowas_set*)iter->second;
+
if (n->size())
{
while (n->begin() != n->end())
{
WhoWasGroup *a = *(n->begin());
- DELETE(a);
+ delete a;
n->pop_front();
}
}
- DELETE(n);
+
+ delete n;
whowas.erase(iter);
whowas_fifo.pop_front();
}
diff --git a/src/modules.cpp b/src/modules.cpp
index 08bbcd513..7c01fcab6 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -224,7 +224,7 @@ void InspIRCd::EraseModule(int j)
{
if (v1 == j)
{
- DELETE(*m);
+ delete *m;
modules.erase(m);
modules.push_back(NULL);
break;
@@ -916,9 +916,9 @@ ConfigReader::ConfigReader(InspIRCd* Instance) : ServerInstance(Instance)
ConfigReader::~ConfigReader()
{
if (this->errorlog)
- DELETE(this->errorlog);
+ delete this->errorlog;
if(this->privatehash)
- DELETE(this->data);
+ delete this->data;
}