1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:14:47 +02:00

Add the anope_override keyword to methods that lack it.

This commit is contained in:
Sadie Powell
2021-04-27 21:41:19 +01:00
parent c00ecc5e02
commit 095a25d473
11 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -221,7 +221,7 @@ class CoreExport ChannelModeVirtual : public T
ChannelMode *Wrap(Anope::string &param) anope_override;
ChannelMode *Unwrap(ChannelMode *cm, Anope::string &param) = 0;
ChannelMode *Unwrap(ChannelMode *cm, Anope::string &param) anope_override = 0;
};
/* The status a user has on a channel (+v, +h, +o) etc */
+1 -1
View File
@@ -34,7 +34,7 @@ class AccessChanAccess : public ChanAccess
return this->ci->GetLevel(name) != ACCESS_INVALID && this->level >= this->ci->GetLevel(name);
}
Anope::string AccessSerialize() const
Anope::string AccessSerialize() const anope_override
{
return stringify(this->level);
}
+1 -1
View File
@@ -30,7 +30,7 @@ class FlagsChanAccess : public ChanAccess
return false;
}
Anope::string AccessSerialize() const
Anope::string AccessSerialize() const anope_override
{
return Anope::string(this->flags.begin(), this->flags.end());
}
+2 -2
View File
@@ -37,7 +37,7 @@ class XOPChanAccess : public ChanAccess
return false;
}
Anope::string AccessSerialize() const
Anope::string AccessSerialize() const anope_override
{
return this->type;
}
@@ -489,7 +489,7 @@ class CommandCSXOP : public Command
return Anope::printf(Language::Translate(source.GetAccount(), _("Modify the list of %s users")), source.command.upper().c_str());
}
void Execute(CommandSource &source, const std::vector<Anope::string> &params)
void Execute(CommandSource &source, const std::vector<Anope::string> &params) anope_override
{
ChannelInfo *ci = ChannelInfo::Find(params[0]);
if (ci == NULL)
+3 -3
View File
@@ -111,12 +111,12 @@ class MyNewsService : public NewsService
return new MyNewsItem();
}
void AddNewsItem(NewsItem *n)
void AddNewsItem(NewsItem *n) anope_override
{
this->newsItems[n->type].push_back(n);
}
void DelNewsItem(NewsItem *n)
void DelNewsItem(NewsItem *n) anope_override
{
std::vector<NewsItem *> &list = this->GetNewsList(n->type);
std::vector<NewsItem *>::iterator it = std::find(list.begin(), list.end(), n);
@@ -125,7 +125,7 @@ class MyNewsService : public NewsService
delete n;
}
std::vector<NewsItem *> &GetNewsList(NewsType t)
std::vector<NewsItem *> &GetNewsList(NewsType t) anope_override
{
return this->newsItems[t];
}
+3 -3
View File
@@ -253,12 +253,12 @@ class CommandOSSXLineBase : public Command
return;
}
virtual bool OnHelp(CommandSource &source, const Anope::string &subcommand) = 0;
virtual bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override = 0;
};
class CommandOSSNLine : public CommandOSSXLineBase
{
XLineManager *xlm()
XLineManager *xlm() anope_override
{
return this->snlines;
}
@@ -484,7 +484,7 @@ class CommandOSSNLine : public CommandOSSXLineBase
class CommandOSSQLine : public CommandOSSXLineBase
{
XLineManager *xlm()
XLineManager *xlm() anope_override
{
return this->sqlines;
}
+1 -1
View File
@@ -208,7 +208,7 @@ class Fantasy : public Module
FOREACH_MOD(OnPostCommand, (source, cmd, params));
}
void OnBotInfo(CommandSource &source, BotInfo *bi, ChannelInfo *ci, InfoFormatter &info)
void OnBotInfo(CommandSource &source, BotInfo *bi, ChannelInfo *ci, InfoFormatter &info) anope_override
{
if (fantasy.HasExt(ci))
info.AddOption(_("Fantasy"));
+1 -1
View File
@@ -326,7 +326,7 @@ class MyHTTPProvider : public HTTPProvider, public Timer
this->pages.erase(page->GetURL());
}
HTTPPage* FindPage(const Anope::string &pname)
HTTPPage* FindPage(const Anope::string &pname) anope_override
{
if (this->pages.count(pname) == 0)
return NULL;
+3 -3
View File
@@ -39,12 +39,12 @@ class MyXMLRPCServiceInterface : public XMLRPCServiceInterface, public HTTPPage
public:
MyXMLRPCServiceInterface(Module *creator, const Anope::string &sname) : XMLRPCServiceInterface(creator, sname), HTTPPage("/xmlrpc", "text/xml") { }
void Register(XMLRPCEvent *event)
void Register(XMLRPCEvent *event) anope_override
{
this->events.push_back(event);
}
void Unregister(XMLRPCEvent *event)
void Unregister(XMLRPCEvent *event) anope_override
{
std::deque<XMLRPCEvent *>::iterator it = std::find(this->events.begin(), this->events.end(), event);
@@ -182,7 +182,7 @@ class MyXMLRPCServiceInterface : public XMLRPCServiceInterface, public HTTPPage
return true;
}
void Reply(XMLRPCRequest &request)
void Reply(XMLRPCRequest &request) anope_override
{
if (!request.id.empty())
request.reply("id", request.id);
+1 -1
View File
@@ -129,7 +129,7 @@ class MemoServCore : public Module, public MemoServService
return MEMO_SUCCESS;
}
void Check(User *u)
void Check(User *u) anope_override
{
const NickCore *nc = u->Account();
if (!nc)
+2 -2
View File
@@ -495,14 +495,14 @@ class NickServCore : public Module, public NickServService
"after %d days if not used."), nickserv_expire / 86400);
}
void OnNickCoreCreate(NickCore *nc)
void OnNickCoreCreate(NickCore *nc) anope_override
{
/* Set default flags */
for (unsigned i = 0; i < defaults.size(); ++i)
nc->Extend<bool>(defaults[i].upper());
}
void OnUserQuit(User *u, const Anope::string &msg)
void OnUserQuit(User *u, const Anope::string &msg) anope_override
{
if (u->server && !u->server->GetQuitReason().empty() && Config->GetModule(this)->Get<bool>("hidenetsplitquit"))
return;