summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-02-14 20:58:01 -0500
committerAdam <Adam@anope.org>2013-02-14 20:58:01 -0500
commitfc1d7ea89b5beed96022499fe7fa86bef7cf2aad (patch)
tree0208b9f5e153191742d15c51d6ca98737d8f7eb9 /src
parent391f2822c8f6da7d6ffa8114817a8baf2aa265d5 (diff)
Switch Destroy methods to delete
Diffstat (limited to 'src')
-rw-r--r--src/config.cpp2
-rw-r--r--src/memos.cpp2
-rw-r--r--src/nickalias.cpp2
-rw-r--r--src/nickcore.cpp2
-rw-r--r--src/regchannel.cpp28
-rw-r--r--src/xline.cpp4
6 files changed, 20 insertions, 20 deletions
diff --git a/src/config.cpp b/src/config.cpp
index 92836e703..fde9c90ad 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -944,7 +944,7 @@ static bool DoneServices(ServerConfig *config, const Anope::string &)
++it;
if (bi->conf && services.count(bi->nick) == 0)
- bi->Destroy();
+ delete bi;
}
services.clear();
return true;
diff --git a/src/memos.cpp b/src/memos.cpp
index 1f8b00fff..065a644f6 100644
--- a/src/memos.cpp
+++ b/src/memos.cpp
@@ -101,7 +101,7 @@ void MemoInfo::Del(unsigned index)
{
if (index >= this->memos->size())
return;
- this->GetMemo(index)->Destroy();
+ delete this->GetMemo(index);
}
bool MemoInfo::HasIgnore(User *u)
diff --git a/src/nickalias.cpp b/src/nickalias.cpp
index dea888f07..5e6960cc6 100644
--- a/src/nickalias.cpp
+++ b/src/nickalias.cpp
@@ -62,7 +62,7 @@ NickAlias::~NickAlias()
this->nc->aliases->erase(it);
if (this->nc->aliases->empty())
{
- this->nc->Destroy();
+ delete this->nc;
this->nc = NULL;
}
else
diff --git a/src/nickcore.cpp b/src/nickcore.cpp
index f92d4739c..dcd324846 100644
--- a/src/nickcore.cpp
+++ b/src/nickcore.cpp
@@ -63,7 +63,7 @@ NickCore::~NickCore()
if (!this->memos.memos->empty())
{
for (unsigned i = 0, end = this->memos.memos->size(); i < end; ++i)
- this->memos.GetMemo(i)->Destroy();
+ delete this->memos.GetMemo(i);
this->memos.memos->clear();
}
}
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index 2a82590e2..76e2dbded 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -378,16 +378,16 @@ ChannelInfo::~ChannelInfo()
this->ClearBadWords();
for (unsigned i = 0; i < this->log_settings->size(); ++i)
- this->log_settings->at(i)->Destroy();
+ delete this->log_settings->at(i);
this->log_settings->clear();
while (!this->mode_locks->empty())
- this->mode_locks->begin()->second->Destroy();
+ delete this->mode_locks->begin()->second;
if (!this->memos.memos->empty())
{
for (unsigned i = 0, end = this->memos.memos->size(); i < end; ++i)
- this->memos.GetMemo(i)->Destroy();
+ delete this->memos.GetMemo(i);
this->memos.memos->clear();
}
@@ -639,13 +639,13 @@ void ChannelInfo::EraseAccess(unsigned index)
if (this->access->empty() || index >= this->access->size())
return;
- this->access->at(index)->Destroy();
+ delete this->access->at(index);
}
void ChannelInfo::ClearAccess()
{
for (unsigned i = this->access->size(); i > 0; --i)
- this->GetAccess(i - 1)->Destroy();
+ delete this->GetAccess(i - 1);
}
AutoKick *ChannelInfo::AddAkick(const Anope::string &user, NickCore *akicknc, const Anope::string &reason, time_t t, time_t lu)
@@ -701,13 +701,13 @@ void ChannelInfo::EraseAkick(unsigned index)
if (this->akick->empty() || index >= this->akick->size())
return;
- this->GetAkick(index)->Destroy();
+ delete this->GetAkick(index);
}
void ChannelInfo::ClearAkick()
{
while (!this->akick->empty())
- this->akick->back()->Destroy();
+ delete this->akick->back();
}
BadWord* ChannelInfo::AddBadWord(const Anope::string &word, BadWordType type)
@@ -746,13 +746,13 @@ void ChannelInfo::EraseBadWord(unsigned index)
FOREACH_MOD(I_OnBadWordDel, OnBadWordDel(this, (*this->badwords)[index]));
- this->badwords->at(index)->Destroy();
+ delete this->badwords->at(index);
}
void ChannelInfo::ClearBadWords()
{
while (!this->badwords->empty())
- this->badwords->back()->Destroy();
+ delete this->badwords->back();
}
bool ChannelInfo::HasMLock(ChannelMode *mode, const Anope::string &param, bool status) const
@@ -793,7 +793,7 @@ bool ChannelInfo::SetMLock(ChannelMode *mode, bool status, const Anope::string &
if (mode->type == MODE_REGULAR || mode->type == MODE_PARAM)
{
for (ChannelInfo::ModeList::const_iterator it; (it = this->mode_locks->find(mode->name)) != this->mode_locks->end();)
- it->second->Destroy();
+ delete it->second;
this->mode_locks->erase(mode->name);
}
else
@@ -808,7 +808,7 @@ bool ChannelInfo::SetMLock(ChannelMode *mode, bool status, const Anope::string &
const ModeLock *modelock = it->second;
if (modelock->param == param)
{
- it->second->Destroy();
+ delete it->second;
break;
}
}
@@ -838,7 +838,7 @@ bool ChannelInfo::RemoveMLock(ChannelMode *mode, bool status, const Anope::strin
FOREACH_RESULT(I_OnUnMLock, OnUnMLock(this, it->second));
if (MOD_RESULT != EVENT_STOP)
{
- it->second->Destroy();
+ delete it->second;
return true;
}
}
@@ -860,7 +860,7 @@ bool ChannelInfo::RemoveMLock(ChannelMode *mode, bool status, const Anope::strin
FOREACH_RESULT(I_OnUnMLock, OnUnMLock(this, it->second));
if (MOD_RESULT == EVENT_STOP)
return false;
- it->second->Destroy();
+ delete it->second;
return true;
}
}
@@ -885,7 +885,7 @@ void ChannelInfo::RemoveMLock(ModeLock *mlock)
void ChannelInfo::ClearMLock()
{
while (!this->mode_locks->empty())
- this->mode_locks->begin()->second->Destroy();
+ delete this->mode_locks->begin()->second;
this->mode_locks->clear();
}
diff --git a/src/xline.cpp b/src/xline.cpp
index 7ab8636ac..67f976d9a 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -301,7 +301,7 @@ bool XLineManager::DelXLine(XLine *x)
{
this->SendDel(x);
- x->Destroy();
+ delete x;
this->xlines->erase(it);
return true;
@@ -327,7 +327,7 @@ void XLineManager::Clear()
XLine *x = this->xlines->at(i);
if (!x->id.empty())
XLinesByUID->erase(x->id);
- x->Destroy();
+ delete x;
}
this->xlines->clear();
}