coverity: "values_in is passed-by-value as parameter to split when it could be moved instead"

This commit is contained in:
folkert van heusden 2024-04-28 01:23:47 +02:00
parent f64f2b78ab
commit 5fdda24365
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1

View file

@ -41,7 +41,7 @@ std::pair<breakpoint_memory *, std::optional<std::string> > breakpoint_memory::p
return { nullptr, "memory: key or value missing" }; return { nullptr, "memory: key or value missing" };
auto values_in = parts.at(1); auto values_in = parts.at(1);
auto v_parts = split(values_in, ","); auto v_parts = split(std::move(values_in), ",");
std::set<uint16_t> values; std::set<uint16_t> values;
for(auto & v: v_parts) for(auto & v: v_parts)
values.insert(std::stoi(v, nullptr, 8)); values.insert(std::stoi(v, nullptr, 8));