From baa880dd191f06d3636127733b64d4d62257e0ae Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Tue, 5 Dec 2023 12:52:26 +0100 Subject: [PATCH] sl: use std::move() where appropriate Suggested by Coverity. Closes: https://github.com/kdudka/predator/pull/91 --- sl/cont_shape.cc | 2 +- sl/fixed_point_proxy.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sl/cont_shape.cc b/sl/cont_shape.cc index d6b8e2f5a..94e57b97c 100644 --- a/sl/cont_shape.cc +++ b/sl/cont_shape.cc @@ -261,7 +261,7 @@ bool ImpliedShapeDetector::indexShape(SymHeap &sh, const Shape &shape) /* props */ shape.props, /* type */ sh.objEstimatedType(beg), /* size */ sh.objSize(beg), - /* headPtrs */ headPtrs + /* headPtrs */ std::move(headPtrs) }; plist_.push_back(sp); diff --git a/sl/fixed_point_proxy.cc b/sl/fixed_point_proxy.cc index 06d816b4e..ee2ec0281 100644 --- a/sl/fixed_point_proxy.cc +++ b/sl/fixed_point_proxy.cc @@ -386,7 +386,7 @@ void plotFixedPointOfFnc(PlotData &plot, const GlobalState &fncState) recorder.flush(&rewriter); // plot the annotated input CFG - plotFncCore(plot, fncState, varByShape, capture, heapSet); + plotFncCore(plot, fncState, varByShape, capture, std::move(heapSet)); if (cfgOrig.size() < 16) { // plot the original CFG-only subgraph