add forgotten forward

parent 418fdbab
...@@ -4267,7 +4267,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec ...@@ -4267,7 +4267,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()), *this)); JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()), *this));
} }
const auto it = m_value.object->find(key); const auto it = m_value.object->find(std::forward<KeyT>(key));
if (it != m_value.object->end()) if (it != m_value.object->end())
{ {
m_value.object->erase(it); m_value.object->erase(it);
......
...@@ -21170,7 +21170,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec ...@@ -21170,7 +21170,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()), *this)); JSON_THROW(type_error::create(307, "cannot use erase() with " + std::string(type_name()), *this));
} }
const auto it = m_value.object->find(key); const auto it = m_value.object->find(std::forward<KeyT>(key));
if (it != m_value.object->end()) if (it != m_value.object->end())
{ {
m_value.object->erase(it); m_value.object->erase(it);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment