From eb194925eca95b35a79b6260bc1bfb27c30f90d6 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 6 Nov 2016 10:36:08 +0000 Subject: wallet2_api: do not copy the whole pending tx when iterating --- src/wallet/api/pending_transaction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wallet/api') diff --git a/src/wallet/api/pending_transaction.cpp b/src/wallet/api/pending_transaction.cpp index 26ce9fc7e..f377e80b6 100644 --- a/src/wallet/api/pending_transaction.cpp +++ b/src/wallet/api/pending_transaction.cpp @@ -128,7 +128,7 @@ uint64_t PendingTransactionImpl::dust() const uint64_t PendingTransactionImpl::fee() const { uint64_t result = 0; - for (const auto ptx : m_pending_tx) { + for (const auto &ptx : m_pending_tx) { result += ptx.fee; } return result; -- cgit v1.2.3