mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
trivial: avoid unneeded copy when iterating through mapDenomCount
Caught by Clang 14 with `--enable-werror`
This commit is contained in:
parent
cba650953a
commit
3a1743fc7f
@ -1727,7 +1727,7 @@ bool CCoinJoinClientSession::CreateDenominated(CAmount nBalanceToDenominate, con
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool finished = true;
|
bool finished = true;
|
||||||
for (const auto [denom, count] : mapDenomCount) {
|
for (const auto& [denom, count] : mapDenomCount) {
|
||||||
// Check if this specific denom could use another loop, check that there aren't nCoinJoinDenomsGoal of this
|
// Check if this specific denom could use another loop, check that there aren't nCoinJoinDenomsGoal of this
|
||||||
// denom and that our nValueLeft/nBalanceToDenominate is enough to create one of these denoms, if so, loop again.
|
// denom and that our nValueLeft/nBalanceToDenominate is enough to create one of these denoms, if so, loop again.
|
||||||
if (count < CCoinJoinClientOptions::GetDenomsGoal() && txBuilder.CouldAddOutput(denom) && nBalanceToDenominate > 0) {
|
if (count < CCoinJoinClientOptions::GetDenomsGoal() && txBuilder.CouldAddOutput(denom) && nBalanceToDenominate > 0) {
|
||||||
@ -1807,7 +1807,7 @@ bool CCoinJoinClientSession::CreateDenominated(CAmount nBalanceToDenominate, con
|
|||||||
|
|
||||||
WalletCJLogPrint(m_wallet, "CCoinJoinClientSession::%s -- 3 - nBalanceToDenominate: %f, %s\n", __func__, (float) nBalanceToDenominate / COIN, txBuilder.ToString());
|
WalletCJLogPrint(m_wallet, "CCoinJoinClientSession::%s -- 3 - nBalanceToDenominate: %f, %s\n", __func__, (float) nBalanceToDenominate / COIN, txBuilder.ToString());
|
||||||
|
|
||||||
for (const auto [denom, count] : mapDenomCount) {
|
for (const auto& [denom, count] : mapDenomCount) {
|
||||||
WalletCJLogPrint(m_wallet, "CCoinJoinClientSession::%s -- 3 - DONE - nDenomValue: %f, count: %d\n", __func__, (float) denom / COIN, count);
|
WalletCJLogPrint(m_wallet, "CCoinJoinClientSession::%s -- 3 - DONE - nDenomValue: %f, count: %d\n", __func__, (float) denom / COIN, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user