From a847107bee100b9bed9aa482735f5124e5557bfb Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 10 Jan 2023 21:43:44 +0000 Subject: Fix using std::move when not appropriate. --- src/modules/extra/m_regex_pcre.cpp | 4 ++-- src/modules/extra/m_regex_posix.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/modules/extra') 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(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); } }; -- cgit v1.3.1-10-gc9f91