mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
Merge bitcoin/bitcoin#28583: refactor: [tidy] modernize-use-emplace
fa05a726c2tidy: 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-utACKfa05a726c2hebasto: ACKfa05a726c2. TheCharlatan: ACKfa05a726c2Tree-SHA512: 4408a094f406e7bf6c1468c2b0798f68f4d952a1253cf5b20bdc648ad7eea4a2c070051fed46d66fd37bce2ce6f85962484a1d32826b7ab8c9baba431eaa2765
This commit is contained in:
@@ -1930,7 +1930,7 @@ static RPCHelpMan getblockstats()
|
||||
// New feerate uses satoshis per virtual byte instead of per serialized byte
|
||||
CAmount feerate = weight ? (txfee * WITNESS_SCALE_FACTOR) / weight : 0;
|
||||
if (do_feerate_percentiles) {
|
||||
feerate_array.emplace_back(std::make_pair(feerate, weight));
|
||||
feerate_array.emplace_back(feerate, weight);
|
||||
}
|
||||
maxfeerate = std::max(maxfeerate, feerate);
|
||||
minfeerate = std::min(minfeerate, feerate);
|
||||
|
||||
Reference in New Issue
Block a user