mirror of
https://github.com/monero-project/monero.git
synced 2026-01-10 04:05:24 -08:00
Remove copies from foreach loops (thanks to Clang)
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user