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

Remove or fix various useless uses of const.

This commit is contained in:
Sadie Powell
2025-12-17 14:10:42 +00:00
parent 3e8c5b2685
commit 0f433ebe9c
11 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -148,7 +148,7 @@ public:
* @param source The source wanting the command description
* @return The commands description
*/
virtual const Anope::string GetDesc(CommandSource &source) const;
virtual Anope::string GetDesc(CommandSource &source) const;
/** Execute this command.
* @param source The source
+1 -1
View File
@@ -152,7 +152,7 @@ public:
{
}
virtual const Anope::string GetIP()
virtual Anope::string GetIP() const
{
return this->clientaddr.addr();
}
+1 -1
View File
@@ -157,7 +157,7 @@ namespace SQL
}
}
const Anope::string Get(size_t index, const Anope::string &col) const
Anope::string Get(size_t index, const Anope::string &col) const
{
const std::map<Anope::string, Anope::string> rows = this->Row(index);
+1 -1
View File
@@ -107,7 +107,7 @@ public:
return true;
}
const Anope::string GetDesc(CommandSource &source) const override
Anope::string GetDesc(CommandSource &source) const override
{
return Anope::Format(Language::Translate(source.GetAccount(), _("Allows you to see %s information about a channel or a bot")), source.service->nick.c_str());
}
+1 -1
View File
@@ -943,7 +943,7 @@ public:
}
}
const Anope::string GetDesc(CommandSource &source) const override
Anope::string GetDesc(CommandSource &source) const override
{
const std::pair<bool, Anope::string> &m = modes[source.command];
if (!m.second.empty())
+1 -1
View File
@@ -514,7 +514,7 @@ public:
this->SetSyntax(_("\037channel\037 CLEAR"));
}
const Anope::string GetDesc(CommandSource &source) const override
Anope::string GetDesc(CommandSource &source) const override
{
return Anope::Format(Language::Translate(source.GetAccount(), _("Modify the list of %s users")), source.command.nobreak().c_str());
}
+1 -1
View File
@@ -115,7 +115,7 @@ public:
return !(!BinarySocket::ProcessWrite() || this->write_buffer.empty());
}
const Anope::string GetIP() override
Anope::string GetIP() const override
{
return this->ip;
}
+2 -2
View File
@@ -75,7 +75,7 @@ public:
return true;
}
const Anope::string GetDesc(CommandSource &source) const override
Anope::string GetDesc(CommandSource &source) const override
{
return Anope::Format(Language::Translate(source.GetAccount(), _("Login to %s")), source.service->nick.c_str());
}
@@ -121,7 +121,7 @@ public:
return true;
}
const Anope::string GetDesc(CommandSource &source) const override
Anope::string GetDesc(CommandSource &source) const override
{
return Anope::Format(Language::Translate(source.GetAccount(), _("Logout from %s")), source.service->nick.c_str());
}
+1 -1
View File
@@ -245,7 +245,7 @@ public:
{
}
const Anope::string GetDesc(CommandSource &source) const override
Anope::string GetDesc(CommandSource &source) const override
{
return Anope::Format(Language::Translate(source.GetAccount(), _("Manipulate the %s list")), source.command.nobreak().c_str());
}
+3 -3
View File
@@ -85,7 +85,7 @@ public:
}
void OnConnect() override = 0;
virtual const Anope::string GetType() const = 0;
virtual const char *GetType() const = 0;
protected:
void Ban()
@@ -134,7 +134,7 @@ public:
this->Write("");
}
const Anope::string GetType() const override
const char *GetType() const override
{
return "HTTP";
}
@@ -187,7 +187,7 @@ public:
this->Write(buf, ptr);
}
const Anope::string GetType() const override
const char *GetType() const override
{
return "SOCKS5";
}
+1 -1
View File
@@ -199,7 +199,7 @@ void Command::RequireUser(bool b)
this->require_user = b;
}
const Anope::string Command::GetDesc(CommandSource &) const
Anope::string Command::GetDesc(CommandSource &) const
{
return this->desc;
}