mirror of https://github.com/Icinga/icinga2.git
Build fix for ancient versions of GCC
This commit is contained in:
parent
b38027ff93
commit
aa76ddf7f2
|
@ -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)
|
||||||
|
|
|
@ -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()); }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue