summaryrefslogtreecommitdiff
path: root/src/modes
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-01-10 15:16:03 +0100
committerAttila Molnar <attilamolnar@hush.com>2015-01-10 15:16:03 +0100
commit47dda4f61512f6047f2b1dcccd1943aab74726e3 (patch)
treea1425a9dbff58b97ef5dcdf169e0d65439513527 /src/modes
parentae10286658d6bb70e5e22526a004ec1b233f6fba (diff)
Reduce std::string::substr() usage
substr() returns a new string while erase() and assign() modify the existing one
Diffstat (limited to 'src/modes')
-rw-r--r--src/modes/cmode_k.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp
index 0f8070cb4..6738c046e 100644
--- a/src/modes/cmode_k.cpp
+++ b/src/modes/cmode_k.cpp
@@ -52,7 +52,7 @@ ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, s
channel->SetMode(this, adding);
if (adding)
{
- parameter = parameter.substr(0, 32);
+ parameter.erase(32);
ext.set(channel, parameter);
}
else