]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
remove redundant moves
authorKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Wed, 17 Jan 2024 15:15:32 +0000 (17:15 +0200)
committerKonstantinos Margaritis <konstantinos@vectorcamp.gr>
Wed, 17 Jan 2024 15:15:32 +0000 (17:15 +0200)
src/nfa/goughcompile.cpp
src/nfa/mcclellancompile.cpp
src/nfa/shengcompile.cpp
src/parser/Parser.rl
tools/hsbench/engine_hyperscan.cpp

index 343a793b8646047535755f6f259cbc7229ca2941..59ef052fe8a2bba47f898e8f7c005915ec55e090 100644 (file)
@@ -1299,7 +1299,7 @@ unique_ptr<raw_report_info> gough_build_strat::gatherReports(
     *arbReport = MO_INVALID_IDX;
     assert(!ri->rl.empty()); /* all components should be able to generate
                                 reports */
-    return std::move(ri);
+    return ri;
 }
 
 u32 raw_gough_report_info_impl::getReportListSize() const {
index d165b1faf5485b2a610f51b4f6bad975f56a9862..3f217ed3c6c967a5fecc575520d16b354ada2364 100644 (file)
@@ -462,7 +462,7 @@ unique_ptr<raw_report_info> mcclellan_build_strat::gatherReports(
         *isSingleReport = 0;
     }
 
-    return std::move(ri);
+    return ri;
 }
 
 u32 raw_report_info_impl::getReportListSize() const {
index aa3537839a1f349461bebfc4b621865fe5cd2c78..055e1971ac067281e17eb35306566322005b4646 100644 (file)
@@ -270,7 +270,7 @@ unique_ptr<raw_report_info> sheng_build_strat::gatherReports(
         *isSingleReport = 0;
     }
 
-    return std::move(ri);
+    return ri;
 }
 
 u32 sheng_build_strat::max_allowed_offset_accel() const {
index ba01511a8dc0cd49bd45b46647527f4ff51e00e8..e5cbfe2b92664428ff0de0aed1814c76867a0c98 100644 (file)
@@ -2024,7 +2024,7 @@ unique_ptr<Component> parse(const char *ptr, ParseMode &globalMode) {
         // Ensure that all references are valid.
         checkReferences(*rootSeq, groupIndex, groupNames);
 
-        return std::move(rootSeq);
+        return rootSeq;
     } catch (LocatedParseError &error) {
         if (ts >= ptr && ts <= pe) {
             error.locate(ts - ptr);
index 0256dc9738b56347dd5fb50c25765905add71e64..95461de53829c1e23bbcf97b4e7e04cdd724912b 100644 (file)
@@ -174,7 +174,7 @@ unique_ptr<EngineStream> EngineHyperscan::streamOpen(EngineContext &ectx,
         return nullptr;
     }
     stream->sn = streamId;
-    return std::move(stream);
+    return stream;
 }
 
 void EngineHyperscan::streamClose(unique_ptr<EngineStream> stream,