Fix some const clang complaints

This commit is contained in:
Gregory Sanders 2019-04-10 09:20:27 -04:00
parent ec62262c51
commit 3ef0e6d96f

View file

@ -2940,7 +2940,7 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CTransac
const OutputType change_type = TransactionChangeType(coin_control.m_change_type ? *coin_control.m_change_type : m_default_change_type, vecSend);
// One change script per output asset.
size_t index = 0;
for (const std::pair<CAsset, CAmount>& value : mapValue) {
for (const auto& value : mapValue) {
CPubKey vchPubKey;
if (index >= reserveKeys.size() || !reserveKeys[index]->GetReservedKey(vchPubKey, true)) {
strFailReason = _("Keypool ran out, please call keypoolrefill first");
@ -3106,7 +3106,7 @@ bool CWallet::CreateTransaction(const std::vector<CRecipient>& vecSend, CTransac
const CAmountMap mapChange = mapValueIn - mapValueToSelect;
for(const std::pair<CAsset, CAmount>& assetChange : mapChange) {
for(const auto& assetChange : mapChange) {
if (assetChange.second == 0) {
vChangePosInOut.erase(assetChange.first);
continue;