Skip to content

Commit

Permalink
Capture structured binding by name
Browse files Browse the repository at this point in the history
  • Loading branch information
Bushstar committed Feb 10, 2023
1 parent 225ba7d commit 36e05af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/masternodes/masternodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ Res CCustomCSView::PopulateLoansData(CCollateralLoans &result,

for (const auto &[loanTokenId, loanTokenAmount] : loanTokens->balances) {
const auto token = GetLoanTokenByID(loanTokenId);
Require(token, [=]{ return strprintf("Loan token with id (%s) does not exist!", loanTokenId.ToString()); });
Require(token, [loanTokenId=loanTokenId]{ return strprintf("Loan token with id (%s) does not exist!", loanTokenId.ToString()); });

const auto rate = GetInterestRate(vaultId, loanTokenId, height);
Require(rate, [=]{ return strprintf("Cannot get interest rate for token (%s)!", token->symbol); });
Expand Down

0 comments on commit 36e05af

Please sign in to comment.