diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-01-10 15:16:03 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-01-10 15:16:03 +0100 |
commit | 47dda4f61512f6047f2b1dcccd1943aab74726e3 (patch) | |
tree | a1425a9dbff58b97ef5dcdf169e0d65439513527 /src/modules/m_autoop.cpp | |
parent | ae10286658d6bb70e5e22526a004ec1b233f6fba (diff) |
Reduce std::string::substr() usage
substr() returns a new string while erase() and assign() modify the existing one
Diffstat (limited to 'src/modules/m_autoop.cpp')
-rw-r--r-- | src/modules/m_autoop.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/m_autoop.cpp b/src/modules/m_autoop.cpp index 801cf6c74..2b9c2e1c2 100644 --- a/src/modules/m_autoop.cpp +++ b/src/modules/m_autoop.cpp @@ -47,7 +47,7 @@ class AutoOpList : public ListModeBase if (pos == 0 || pos == std::string::npos) return adding ? MOD_RES_DENY : MOD_RES_PASSTHRU; unsigned int mylevel = channel->GetPrefixValue(source); - std::string mid = parameter.substr(0, pos); + std::string mid(parameter, 0, pos); PrefixMode* mh = FindMode(mid); if (adding && !mh) |