aboutsummaryrefslogtreecommitdiff
path: root/src/bench/wallet_loading.cpp
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-10-16 14:56:54 +0100
committerfanquake <fanquake@gmail.com>2023-10-16 15:35:50 +0100
commit08ea835220baa88a0e226eff90f66bbae3eb7a0f (patch)
treed8760ac8bc90b3524abac8f8fa13f11cd8d83633 /src/bench/wallet_loading.cpp
parent92704535f66976c09a658348e554d47b7f7bcf6e (diff)
parentfa05a726c225dc65dee79367bb67f099ae4f99e6 (diff)
Merge bitcoin/bitcoin#28583: refactor: [tidy] modernize-use-emplace
fa05a726c225dc65dee79367bb67f099ae4f99e6 tidy: modernize-use-emplace (MarcoFalke) Pull request description: Constructing a temporary unnamed object only to copy or move it into a container seems both verbose in code and a strict performance penalty. Fix both issues via the `modernize-use-emplace` tidy check. ACKs for top commit: Sjors: re-utACK fa05a726c2 hebasto: ACK fa05a726c225dc65dee79367bb67f099ae4f99e6. TheCharlatan: ACK fa05a726c225dc65dee79367bb67f099ae4f99e6 Tree-SHA512: 4408a094f406e7bf6c1468c2b0798f68f4d952a1253cf5b20bdc648ad7eea4a2c070051fed46d66fd37bce2ce6f85962484a1d32826b7ab8c9baba431eaa2765
Diffstat (limited to 'src/bench/wallet_loading.cpp')
-rw-r--r--src/bench/wallet_loading.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bench/wallet_loading.cpp b/src/bench/wallet_loading.cpp
index 5453238728..b17c7fe05a 100644
--- a/src/bench/wallet_loading.cpp
+++ b/src/bench/wallet_loading.cpp
@@ -20,8 +20,8 @@ namespace wallet{
static void AddTx(CWallet& wallet)
{
CMutableTransaction mtx;
- mtx.vout.push_back({COIN, GetScriptForDestination(*Assert(wallet.GetNewDestination(OutputType::BECH32, "")))});
- mtx.vin.push_back(CTxIn());
+ mtx.vout.emplace_back(COIN, GetScriptForDestination(*Assert(wallet.GetNewDestination(OutputType::BECH32, ""))));
+ mtx.vin.emplace_back();
wallet.AddToWallet(MakeTransactionRef(mtx), TxStateInactive{});
}