From 66e769672cd89774f868105e101f3ae419239209 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 28 Mar 2014 23:00:20 +0100 Subject: [PATCH] Fix failed assertion in ConfigItem::GetProperties. Refs #5870 --- lib/config/configitem.cpp | 2 ++ lib/config/configitembuilder.cpp | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp index f646e9ed0..5f3052b35 100644 --- a/lib/config/configitem.cpp +++ b/lib/config/configitem.cpp @@ -116,6 +116,8 @@ Dictionary::Ptr ConfigItem::GetProperties(void) if (!m_Properties) { m_Properties = make_shared(); + m_Properties->Set("type", m_Type); + m_Properties->Set("name", m_Name); m_Properties->Set("__parent", m_Scope); GetExpressionList()->Evaluate(m_Properties); m_Properties->Remove("__parent"); diff --git a/lib/config/configitembuilder.cpp b/lib/config/configitembuilder.cpp index 13d9b7c91..dc4f20b7f 100644 --- a/lib/config/configitembuilder.cpp +++ b/lib/config/configitembuilder.cpp @@ -89,12 +89,6 @@ ConfigItem::Ptr ConfigItemBuilder::Compile(void) Array::Ptr templateArray = make_shared(); templateArray->Add(m_Name); exprs->Add(make_shared(&AExpression::OpSetPlus, "templates", make_shared(&AExpression::OpLiteral, templateArray, m_DebugInfo), m_DebugInfo)); - - if (!m_Abstract) { - exprs->Add(make_shared(&AExpression::OpSet, "type", make_shared(&AExpression::OpLiteral, m_Type, m_DebugInfo), m_DebugInfo)); - exprs->Add(make_shared(&AExpression::OpSet, "name", make_shared(&AExpression::OpLiteral, m_Name, m_DebugInfo), m_DebugInfo)); - } - exprs->Add(make_shared(&AExpression::OpDict, m_Expressions, true, m_DebugInfo)); AExpression::Ptr exprl = make_shared(&AExpression::OpDict, exprs, true, m_DebugInfo);