diff --git a/src/ast.cpp b/src/ast.cpp index c951bae..56547ba 100644 --- a/src/ast.cpp +++ b/src/ast.cpp @@ -58,7 +58,7 @@ void HashMap::add(const std::string& key, ValuePtr value) return; } - m_elements.emplace(key, value); + m_elements.insert_or_assign(key, value); } void HashMap::add(ValuePtr key, ValuePtr value) @@ -67,7 +67,7 @@ void HashMap::add(ValuePtr key, ValuePtr value) return; } - m_elements.emplace(getKeyString(key), value); + m_elements.insert_or_assign(getKeyString(key), value); } void HashMap::remove(const std::string& key)