diff --git a/lib/base/dictionary.cpp b/lib/base/dictionary.cpp index d4ac10b50..8472cc68d 100644 --- a/lib/base/dictionary.cpp +++ b/lib/base/dictionary.cpp @@ -32,13 +32,13 @@ REGISTER_PRIMITIVE_TYPE(Dictionary, Object, Dictionary::GetPrototype()); Dictionary::Dictionary(const DictionaryData& other) { for (const auto& kv : other) - m_Data.emplace(kv); + m_Data.insert(kv); } Dictionary::Dictionary(DictionaryData&& other) { for (auto& kv : other) - m_Data.emplace(std::move(kv)); + m_Data.insert(std::move(kv)); } Dictionary::Dictionary(std::initializer_list init) diff --git a/lib/base/object.hpp b/lib/base/object.hpp index 2b5d00379..2dabb3038 100644 --- a/lib/base/object.hpp +++ b/lib/base/object.hpp @@ -129,10 +129,10 @@ struct Lazy operator Lazy() const { if (m_Cached) - return Lazy(m_Value); + return Lazy(static_cast(m_Value)); else { Accessor accessor = m_Accessor; - return Lazy([accessor]() { return static_cast(accessor()); }); + return Lazy(static_cast::Accessor>([accessor]() { return static_cast(accessor()); })); } }