From 73d4ac6de04a1035ac36182d3f269cc938c6bc19 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 27 Feb 2024 10:34:27 +0000 Subject: Remove redundant uses of const. --- src/hashcomp.cpp | 2 +- src/misc.cpp | 2 +- src/modes.cpp | 4 ++-- src/opertype.cpp | 4 ++-- src/socket_transport.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') 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 OperType::GetCommands() const +std::list OperType::GetCommands() const { std::list cmd_list = this->commands; for (auto *ot : this->inheritances) @@ -119,7 +119,7 @@ const std::list OperType::GetCommands() const return cmd_list; } -const std::list OperType::GetPrivs() const +std::list OperType::GetPrivs() const { std::list 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) -- cgit