summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-02-27 10:34:27 +0000
committerSadie Powell <sadie@witchery.services>2024-02-27 10:34:27 +0000
commit73d4ac6de04a1035ac36182d3f269cc938c6bc19 (patch)
tree84d50083d34ea1d69b832a5e55eab50ebc1ac71b
parent7640fad30cc2a3d61e67a7075c27f26400d4779f (diff)
Remove redundant uses of const.
-rw-r--r--include/anope.h4
-rw-r--r--include/modes.h4
-rw-r--r--include/opertype.h4
-rw-r--r--include/sockets.h2
-rw-r--r--modules/chanstats.cpp2
-rw-r--r--src/hashcomp.cpp2
-rw-r--r--src/misc.cpp2
-rw-r--r--src/modes.cpp4
-rw-r--r--src/opertype.cpp4
-rw-r--r--src/socket_transport.cpp2
10 files changed, 15 insertions, 15 deletions
diff --git a/include/anope.h b/include/anope.h
index b71f84f19..6031dceac 100644
--- a/include/anope.h
+++ b/include/anope.h
@@ -495,7 +495,7 @@ namespace Anope
/** Return the last error, uses errno/GetLastError() to determine this
* @return An error message
*/
- extern CoreExport const string LastError();
+ extern CoreExport string LastError();
/** Determines if a path is a file
*/
@@ -623,7 +623,7 @@ public:
/** Fetch the entire remaining stream, without tokenizing
* @return The remaining part of the stream
*/
- const Anope::string GetRemaining();
+ Anope::string GetRemaining();
/** Returns true if the end of the stream has been reached
* @return True if the end of the stream has been reached, otherwise false
diff --git a/include/modes.h b/include/modes.h
index f1c116f1c..0198e6843 100644
--- a/include/modes.h
+++ b/include/modes.h
@@ -419,9 +419,9 @@ public:
/** Get the banned mask for this entry
* @return The mask
*/
- const Anope::string GetMask() const;
+ Anope::string GetMask() const;
- const Anope::string GetNUHMask() const;
+ Anope::string GetNUHMask() const;
/** Check if this entry matches a user
* @param u The user
diff --git a/include/opertype.h b/include/opertype.h
index d9f0f709f..1ec7f7aca 100644
--- a/include/opertype.h
+++ b/include/opertype.h
@@ -115,10 +115,10 @@ public:
/** Gets the icommands for this opertype
* @return A list of commands
*/
- const std::list<Anope::string> GetCommands() const;
+ std::list<Anope::string> GetCommands() const;
/** Gets the privileges for this opertype
* @return A list of privileges
*/
- const std::list<Anope::string> GetPrivs() const;
+ std::list<Anope::string> GetPrivs() const;
};
diff --git a/include/sockets.h b/include/sockets.h
index b8aacc7e7..853ba0470 100644
--- a/include/sockets.h
+++ b/include/sockets.h
@@ -313,7 +313,7 @@ public:
/** Gets the new line from the input buffer, if any
*/
- const Anope::string GetLine();
+ Anope::string GetLine();
/** Write to the socket
* @param message The message
diff --git a/modules/chanstats.cpp b/modules/chanstats.cpp
index 06e457f21..b2887dfd5 100644
--- a/modules/chanstats.cpp
+++ b/modules/chanstats.cpp
@@ -210,7 +210,7 @@ class MChanstats final
return smileys;
}
- const Anope::string GetDisplay(User *u)
+ Anope::string GetDisplay(User *u)
{
if (u && u->Account() && ns_stats.HasExt(u->Account()))
return u->Account()->display;
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp
index e9fe97ba5..a32fee037 100644
--- a/src/hashcomp.cpp
+++ b/src/hashcomp.cpp
@@ -152,7 +152,7 @@ bool sepstream::GetTokenRemainder(Anope::string &token, int num)
return false;
}
-const Anope::string sepstream::GetRemaining()
+Anope::string sepstream::GetRemaining()
{
return !this->StreamEnd() ? this->tokens.substr(this->pos) : "";
}
diff --git a/src/misc.cpp b/src/misc.cpp
index b8095af41..b44176ecd 100644
--- a/src/misc.cpp
+++ b/src/misc.cpp
@@ -576,7 +576,7 @@ int Anope::LastErrorCode()
#endif
}
-const Anope::string Anope::LastError()
+Anope::string Anope::LastError()
{
#ifndef _WIN32
return strerror(errno);
diff --git a/src/modes.cpp b/src/modes.cpp
index 876492e98..9d344e153 100644
--- a/src/modes.cpp
+++ b/src/modes.cpp
@@ -806,12 +806,12 @@ Entry::Entry(const Anope::string &m, const Anope::string &fh) : name(m), mask(fh
this->real.clear();
}
-const Anope::string Entry::GetMask() const
+Anope::string Entry::GetMask() const
{
return this->mask;
}
-const Anope::string Entry::GetNUHMask() const
+Anope::string Entry::GetNUHMask() const
{
Anope::string n = nick.empty() ? "*" : nick,
u = user.empty() ? "*" : user,
diff --git a/src/opertype.cpp b/src/opertype.cpp
index acfe40135..0ff541e5d 100644
--- a/src/opertype.cpp
+++ b/src/opertype.cpp
@@ -108,7 +108,7 @@ void OperType::Inherits(OperType *ot)
this->inheritances.insert(ot);
}
-const std::list<Anope::string> OperType::GetCommands() const
+std::list<Anope::string> OperType::GetCommands() const
{
std::list<Anope::string> cmd_list = this->commands;
for (auto *ot : this->inheritances)
@@ -119,7 +119,7 @@ const std::list<Anope::string> OperType::GetCommands() const
return cmd_list;
}
-const std::list<Anope::string> OperType::GetPrivs() const
+std::list<Anope::string> OperType::GetPrivs() const
{
std::list<Anope::string> priv_list = this->privs;
for (auto *ot : this->inheritances)
diff --git a/src/socket_transport.cpp b/src/socket_transport.cpp
index 590917a4e..7bae97177 100644
--- a/src/socket_transport.cpp
+++ b/src/socket_transport.cpp
@@ -47,7 +47,7 @@ bool BufferedSocket::ProcessWrite()
return true;
}
-const Anope::string BufferedSocket::GetLine()
+Anope::string BufferedSocket::GetLine()
{
size_t s = this->read_buffer.find('\n');
if (s == Anope::string::npos)