Build fix for ancient versions of GCC

This commit is contained in:
Gunnar Beutner 2018-01-18 14:45:47 +01:00
parent b38027ff93
commit aa76ddf7f2
2 changed files with 4 additions and 4 deletions

View File

@ -32,13 +32,13 @@ REGISTER_PRIMITIVE_TYPE(Dictionary, Object, Dictionary::GetPrototype());
Dictionary::Dictionary(const DictionaryData& other) Dictionary::Dictionary(const DictionaryData& other)
{ {
for (const auto& kv : other) for (const auto& kv : other)
m_Data.emplace(kv); m_Data.insert(kv);
} }
Dictionary::Dictionary(DictionaryData&& other) Dictionary::Dictionary(DictionaryData&& other)
{ {
for (auto& kv : other) for (auto& kv : other)
m_Data.emplace(std::move(kv)); m_Data.insert(std::move(kv));
} }
Dictionary::Dictionary(std::initializer_list<Dictionary::Pair> init) Dictionary::Dictionary(std::initializer_list<Dictionary::Pair> init)

View File

@ -129,10 +129,10 @@ struct Lazy
operator Lazy<U>() const operator Lazy<U>() const
{ {
if (m_Cached) if (m_Cached)
return Lazy<U>(m_Value); return Lazy<U>(static_cast<U>(m_Value));
else { else {
Accessor accessor = m_Accessor; Accessor accessor = m_Accessor;
return Lazy<U>([accessor]() { return static_cast<U>(accessor()); }); return Lazy<U>(static_cast<typename Lazy<U>::Accessor>([accessor]() { return static_cast<U>(accessor()); }));
} }
} }