From 51ad0ab603cdea62c258e470b01a0cb728c24bc2 Mon Sep 17 00:00:00 2001 From: Glenn Willen Date: Thu, 2 May 2019 18:09:46 -0700 Subject: [PATCH] Fix warnings related to iterator types --- src/wallet/rpcwallet.cpp | 2 +- src/wallet/wallet.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index f18ee1cd59..3455c2c180 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3113,7 +3113,7 @@ void FundTransaction(CWallet* const pwallet, CMutableTransaction& tx, CAmount& f std::map kvMap; options["changeAddress"].getObjMap(kvMap); - for (const std::pair& kv : kvMap) { + for (const auto& kv : kvMap) { CAsset asset = GetAssetFromString(kv.first); if (asset.IsNull()) { throw JSONRPCError(RPC_INVALID_PARAMETER, "changeAddress key must be a valid asset label or hex"); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 8eb09ba708..f5531a9eb2 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2932,7 +2932,7 @@ bool CWallet::CreateTransaction(const std::vector& vecSend, CTransac mapScriptChange.clear(); if (coin_control.destChange.size() > 0) { - for (const std::pair& dest : coin_control.destChange) { + for (const auto& dest : coin_control.destChange) { // No need to test we cover all assets. We produce error for that later. mapScriptChange[dest.first] = std::pair(-1, GetScriptForDestination(dest.second)); } @@ -3463,7 +3463,7 @@ bool CWallet::CreateTransaction(const std::vector& vecSend, CTransac } // Release any change keys that we didn't use. - for (const std::pair>& it : mapScriptChange) { + for (const auto& it : mapScriptChange) { int index = it.second.first; if (index < 0) { continue;