mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-21 04:09:09 +02:00
rpc: avoid copying into UniValue
These are simple (and hopefully obviously correct) copies that can be moves instead.
This commit is contained in:
@@ -43,7 +43,7 @@ UniValue BanMapToJson(const banmap_t& bans)
|
||||
const auto& ban_entry = it.second;
|
||||
UniValue j = ban_entry.ToJson();
|
||||
j.pushKV(BANMAN_JSON_ADDR_KEY, address.ToString());
|
||||
bans_json.push_back(j);
|
||||
bans_json.push_back(std::move(j));
|
||||
}
|
||||
return bans_json;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user