aboutsummaryrefslogtreecommitdiff
path: root/tests/core_tests
diff options
context:
space:
mode:
authorLee Clagett <code@leeclagett.com>2021-01-28 23:42:40 -0500
committerLee Clagett <code@leeclagett.com>2021-01-28 23:42:40 -0500
commitbd129849f0b634bddf64a195097b15d585e8f2bd (patch)
treea8aba2ce30da01d1310b468b8cc63dac2e044cf6 /tests/core_tests
parentRemoving unused namespace alias (diff)
downloadmonero-bd129849f0b634bddf64a195097b15d585e8f2bd.tar.xz
Remove copies from foreach loops (thanks to Clang)
Diffstat (limited to 'tests/core_tests')
-rw-r--r--tests/core_tests/tx_pool.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/core_tests/tx_pool.cpp b/tests/core_tests/tx_pool.cpp
index 1e496f3da..c80cbdb98 100644
--- a/tests/core_tests/tx_pool.cpp
+++ b/tests/core_tests/tx_pool.cpp
@@ -393,7 +393,7 @@ bool txpool_double_spend_base::check_changed(cryptonote::core& c, const size_t e
}
}
- for (const std::pair<crypto::hash, uint64_t>& hash : m_all_hashes)
+ for (const std::pair<const crypto::hash, uint64_t>& hash : m_all_hashes)
{
cryptonote::blobdata tx_blob{};
if (!c.get_pool_transaction(hash.first, tx_blob, cryptonote::relay_category::all))
@@ -411,7 +411,7 @@ bool txpool_double_spend_base::check_changed(cryptonote::core& c, const size_t e
for (const crypto::hash& hash : m_no_relay_hashes)
difference.erase(hash);
- for (const std::pair<crypto::hash, uint64_t>& hash : difference)
+ for (const std::pair<const crypto::hash, uint64_t>& hash : difference)
{
if (c.pool_has_tx(hash.first))
{