diff options
| author | 2023-01-10 21:43:44 +0000 | |
|---|---|---|
| committer | 2023-01-10 21:43:44 +0000 | |
| commit | a847107bee100b9bed9aa482735f5124e5557bfb (patch) | |
| tree | 84b23d66476f7baec29bac0593637e98db300d80 /src | |
| parent | Avoid copying various shared_ptr usages when not necessary. (diff) | |
Fix using std::move when not appropriate.
Diffstat (limited to 'src')
| -rw-r--r-- | src/coremods/core_oper/umode_s.cpp | 2 | ||||
| -rw-r--r-- | src/modules/extra/m_regex_pcre.cpp | 4 | ||||
| -rw-r--r-- | src/modules/extra/m_regex_posix.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_namedmodes.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_regex_stdlib.cpp | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/src/coremods/core_oper/umode_s.cpp b/src/coremods/core_oper/umode_s.cpp index 0070226e0..8e8c7701c 100644 --- a/src/coremods/core_oper/umode_s.cpp +++ b/src/coremods/core_oper/umode_s.cpp @@ -149,7 +149,7 @@ std::string ModeUserServerNoticeMask::ProcessNoticeMasks(User* user, const std:: output = std::move(plus); if (minus.length() > 1) - output += std::move(minus); + output += minus; // Unset the snomask usermode itself if every snomask was unset if (user->snomasks.none()) diff --git a/src/modules/extra/m_regex_pcre.cpp b/src/modules/extra/m_regex_pcre.cpp index 0fb7d2974..5313cb9d6 100644 --- a/src/modules/extra/m_regex_pcre.cpp +++ b/src/modules/extra/m_regex_pcre.cpp @@ -110,13 +110,13 @@ public: int matchidx = (nametable[0] << 8) | nametable[1]; const std::string matchname(reinterpret_cast<const char*>(nametable + 2), nameentrysize - 3); const std::string matchvalue(text.c_str() + ovector[2 * matchidx], ovector[ 2 * matchidx + 1] - ovector[2 * matchidx]); - namedcaptures.emplace(std::move(matchname), std::move(matchvalue)); + namedcaptures.emplace(matchname, matchvalue); nametable += nameentrysize; } } } - return Regex::MatchCollection(std::move(captures), std::move(namedcaptures)); + return Regex::MatchCollection(captures, namedcaptures); } }; diff --git a/src/modules/extra/m_regex_posix.cpp b/src/modules/extra/m_regex_posix.cpp index cce12006a..ce3a8e03a 100644 --- a/src/modules/extra/m_regex_posix.cpp +++ b/src/modules/extra/m_regex_posix.cpp @@ -91,7 +91,7 @@ public: // The posix engine does not support named captures. static const Regex::NamedCaptures unusednc; - return Regex::MatchCollection(std::move(captures), unusednc); + return Regex::MatchCollection(captures, unusednc); } }; diff --git a/src/modules/m_namedmodes.cpp b/src/modules/m_namedmodes.cpp index ffd999f6e..23c556408 100644 --- a/src/modules/m_namedmodes.cpp +++ b/src/modules/m_namedmodes.cpp @@ -193,7 +193,7 @@ public: } // Put the actual ModeHandler in place of the namebase handler - curr.mh = std::move(mh); + curr.mh = mh; } ++i; diff --git a/src/modules/m_regex_stdlib.cpp b/src/modules/m_regex_stdlib.cpp index f9d6361ea..5721425bd 100644 --- a/src/modules/m_regex_stdlib.cpp +++ b/src/modules/m_regex_stdlib.cpp @@ -68,7 +68,7 @@ public: // The stdregex engine does not support named captures. static const Regex::NamedCaptures unusednc; - return Regex::MatchCollection(std::move(captures), unusednc); + return Regex::MatchCollection(captures, unusednc); } }; |
