diff --git a/lib/programmemory.cpp b/lib/programmemory.cpp index af86ef98318..ee52f003b5d 100644 --- a/lib/programmemory.cpp +++ b/lib/programmemory.cpp @@ -1529,13 +1529,13 @@ namespace { std::vector result = infer(ValueFlow::makeIntegralInferModel(), expr->str(), expr->astOperand1()->values(), {std::move(rhs)}); if (!result.empty() && result.front().isKnown()) - return result.front(); + return std::move(result.front()); } if (lhs.isIntValue() && !expr->astOperand2()->values().empty()) { std::vector result = infer(ValueFlow::makeIntegralInferModel(), expr->str(), {std::move(lhs)}, expr->astOperand2()->values()); if (!result.empty() && result.front().isKnown()) - return result.front(); + return std::move(result.front()); } return unknown(); } @@ -1613,7 +1613,7 @@ namespace { ex.fdepth--; auto r = ex.execute(f->functionScope); if (!r.empty()) - result = r.front(); + result = std::move(r.front()); // TODO: Track values changed by reference } } else {