Use structured bindings in some places:

Most of the new uses either:
* Replace some uses of `tie`
* bind to pairs when iterating through maps
This commit is contained in:
seelabs
2019-08-06 09:11:32 -07:00
parent 9c58f23cf8
commit 7912ee6f7b
66 changed files with 428 additions and 466 deletions

View File

@@ -104,12 +104,10 @@ scaleFeeLoad(std::uint64_t fee, LoadFeeTrack const& feeTrack,
{
if (fee == 0)
return fee;
std::uint32_t feeFactor;
std::uint32_t uRemFee;
{
// Collect the fee rates
std::tie(feeFactor, uRemFee) = feeTrack.getScalingFactors();
}
// Collect the fee rates
auto [feeFactor, uRemFee] = feeTrack.getScalingFactors();
// Let privileged users pay the normal fee until
// the local load exceeds four times the remote.
if (bUnlimited && (feeFactor > uRemFee) && (feeFactor < (4 * uRemFee)))