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:
+1
-1
@@ -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
|
||||
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
virtual const Anope::string GetIP()
|
||||
virtual Anope::string GetIP() const
|
||||
{
|
||||
return this->clientaddr.addr();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user