diff options
author | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-10-04 13:53:40 +0200 |
---|---|---|
committer | MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> | 2023-10-12 11:27:19 +0200 |
commit | fa05a726c225dc65dee79367bb67f099ae4f99e6 (patch) | |
tree | 8bf1f8a82fcf024fe110ac76f9563acf2b1132cf /src/wallet/scriptpubkeyman.cpp | |
parent | 4a5aae9330780c3740e27cc511f7cba1fab745b9 (diff) | |
download | bitcoin-fa05a726c225dc65dee79367bb67f099ae4f99e6.tar.xz |
tidy: modernize-use-emplace
Diffstat (limited to 'src/wallet/scriptpubkeyman.cpp')
-rw-r--r-- | src/wallet/scriptpubkeyman.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/scriptpubkeyman.cpp b/src/wallet/scriptpubkeyman.cpp index 20f735da12..bc3327cdb2 100644 --- a/src/wallet/scriptpubkeyman.cpp +++ b/src/wallet/scriptpubkeyman.cpp @@ -1902,7 +1902,7 @@ std::optional<MigrationData> LegacyScriptPubKeyMan::MigrateToDescriptor() std::string desc_str; bool watchonly = !desc->ToPrivateString(*this, desc_str); if (watchonly && !m_storage.IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)) { - out.watch_descs.push_back({desc->ToString(), creation_time}); + out.watch_descs.emplace_back(desc->ToString(), creation_time); // Get the scriptPubKeys without writing this to the wallet FlatSigningProvider provider; @@ -1971,14 +1971,14 @@ std::optional<MigrationData> LegacyScriptPubKeyMan::MigrateToDescriptor() assert(IsMine(sh_spk) == ISMINE_NO && IsMine(witprog) == ISMINE_NO && IsMine(sh_wsh_spk) == ISMINE_NO); std::unique_ptr<Descriptor> sh_desc = InferDescriptor(sh_spk, *GetSolvingProvider(sh_spk)); - out.solvable_descs.push_back({sh_desc->ToString(), creation_time}); + out.solvable_descs.emplace_back(sh_desc->ToString(), creation_time); const auto desc = InferDescriptor(witprog, *this); if (desc->IsSolvable()) { std::unique_ptr<Descriptor> wsh_desc = InferDescriptor(witprog, *GetSolvingProvider(witprog)); - out.solvable_descs.push_back({wsh_desc->ToString(), creation_time}); + out.solvable_descs.emplace_back(wsh_desc->ToString(), creation_time); std::unique_ptr<Descriptor> sh_wsh_desc = InferDescriptor(sh_wsh_spk, *GetSolvingProvider(sh_wsh_spk)); - out.solvable_descs.push_back({sh_wsh_desc->ToString(), creation_time}); + out.solvable_descs.emplace_back(sh_wsh_desc->ToString(), creation_time); } } } |