remove std::forward in loops

This commit is contained in:
Niels Lohmann 2023-06-07 20:30:55 +02:00
parent 085a7fb76f
commit 35ede50cfd
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 8 additions and 8 deletions

View File

@ -184,7 +184,7 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
{ {
for (auto it = this->begin(); it != this->end(); ++it) for (auto it = this->begin(); it != this->end(); ++it)
{ {
if (m_compare(it->first, key) // NOLINT(cppcoreguidelines-missing-std-forward) if (m_compare(it->first, key)) // NOLINT(cppcoreguidelines-missing-std-forward)
{ {
// Since we cannot move const Keys, re-construct them in place // Since we cannot move const Keys, re-construct them in place
for (auto next = it; ++next != this->end(); ++it) for (auto next = it; ++next != this->end(); ++it)

View File

@ -19102,7 +19102,7 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
{ {
for (auto it = this->begin(); it != this->end(); ++it) for (auto it = this->begin(); it != this->end(); ++it)
{ {
if (m_compare(it->first, key) // NOLINT(cppcoreguidelines-missing-std-forward) if (m_compare(it->first, key)) // NOLINT(cppcoreguidelines-missing-std-forward)
{ {
// Since we cannot move const Keys, re-construct them in place // Since we cannot move const Keys, re-construct them in place
for (auto next = it; ++next != this->end(); ++it) for (auto next = it; ++next != this->end(); ++it)