From aa76ddf7f26fa90595ecf1ee0f8652410a8b549f Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 18 Jan 2018 14:45:47 +0100 Subject: [PATCH] Build fix for ancient versions of GCC --- lib/base/dictionary.cpp | 4 ++-- lib/base/object.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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()); })); } }