diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2024-05-13 20:20:10 +0000 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2024-05-20 16:48:19 +0000 |
commit | d7707d9843b03f20d2a8c5a45d7b3db58e169e6f (patch) | |
tree | 30b3b88003c41ef7521e1b2e7bbb6add06892505 /src/wallet/rpc/backup.cpp | |
parent | ecd23656db174adef61d3bd753d02698c3528192 (diff) |
rpc: avoid copying into UniValue
These are simple (and hopefully obviously correct) copies that can be moves
instead.
Diffstat (limited to 'src/wallet/rpc/backup.cpp')
-rw-r--r-- | src/wallet/rpc/backup.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/rpc/backup.cpp b/src/wallet/rpc/backup.cpp index 8d3eea59ee..a76ae7196c 100644 --- a/src/wallet/rpc/backup.cpp +++ b/src/wallet/rpc/backup.cpp @@ -1827,16 +1827,16 @@ RPCHelpMan listdescriptors() UniValue range(UniValue::VARR); range.push_back(info.range->first); range.push_back(info.range->second - 1); - spk.pushKV("range", range); + spk.pushKV("range", std::move(range)); spk.pushKV("next", info.next_index); spk.pushKV("next_index", info.next_index); } - descriptors.push_back(spk); + descriptors.push_back(std::move(spk)); } UniValue response(UniValue::VOBJ); response.pushKV("wallet_name", wallet->GetName()); - response.pushKV("descriptors", descriptors); + response.pushKV("descriptors", std::move(descriptors)); return response; }, |