diff options
author | Sadie Powell <sadie@witchery.services> | 2024-02-27 10:34:27 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-02-27 10:34:27 +0000 |
commit | 73d4ac6de04a1035ac36182d3f269cc938c6bc19 (patch) | |
tree | 84d50083d34ea1d69b832a5e55eab50ebc1ac71b /src | |
parent | 7640fad30cc2a3d61e67a7075c27f26400d4779f (diff) |
Remove redundant uses of const.
Diffstat (limited to 'src')
-rw-r--r-- | src/hashcomp.cpp | 2 | ||||
-rw-r--r-- | src/misc.cpp | 2 | ||||
-rw-r--r-- | src/modes.cpp | 4 | ||||
-rw-r--r-- | src/opertype.cpp | 4 | ||||
-rw-r--r-- | src/socket_transport.cpp | 2 |
5 files changed, 7 insertions, 7 deletions
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) |