Merge pull request #7355

bd12984 Remove copies from foreach loops (thanks to Clang) (Lee Clagett)
1572df9 Removing unused namespace alias (Lee Clagett)
This commit is contained in:
luigi1111 2021-02-18 14:06:47 -05:00
commit 6556c33f13
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
9 changed files with 17 additions and 19 deletions

View file

@ -390,7 +390,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))
@ -408,7 +408,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))
{