aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_abbreviation.cpp2
-rw-r--r--src/modules/m_cap.cpp3
-rw-r--r--src/modules/m_spanningtree/fjoin.cpp2
3 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/m_abbreviation.cpp b/src/modules/m_abbreviation.cpp
index 4517e6a45..7cc0deb41 100644
--- a/src/modules/m_abbreviation.cpp
+++ b/src/modules/m_abbreviation.cpp
@@ -46,7 +46,7 @@ public:
ModResult OnPreCommand(std::string& command, CommandBase::Params& parameters, LocalUser* user, bool validated) override
{
/* Command is already validated, has a length of 0, or last character is not a . */
- if (validated || command.empty() || *command.rbegin() != '.')
+ if (validated || command.empty() || command.back() != '.')
return MOD_RES_PASSTHRU;
/* Look for any command that starts with the same characters, if it does, replace the command string with it */
diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp
index 745c5f847..c23f98ad5 100644
--- a/src/modules/m_cap.cpp
+++ b/src/modules/m_cap.cpp
@@ -337,8 +337,7 @@ void Cap::ExtItem::FromInternal(Extensible* container, const std::string& value)
return; // Can't happen
// Process the cap protocol version which is a single character at the end of the serialized string
- const char verchar = *value.rbegin();
- if (verchar == '2')
+ if (value.back() == '2')
managerimpl->Set302Protocol(user);
// Remove the version indicator from the string passed to HandleReq
diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp
index a478094b2..7aba0a379 100644
--- a/src/modules/m_spanningtree/fjoin.cpp
+++ b/src/modules/m_spanningtree/fjoin.cpp
@@ -314,7 +314,7 @@ void CommandFJoin::Builder::clear()
const std::string& CommandFJoin::Builder::finalize()
{
- if (*content.rbegin() == ' ')
+ if (content.back() == ' ')
content.erase(content.size()-1);
return str();
}