mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-22 21:24:41 +02:00
parent
c66ac66219
commit
013690e486
@ -368,7 +368,10 @@ Value AExpression::OpSetPlus(const AExpression *expr, const Dictionary::Ptr& loc
|
|||||||
|
|
||||||
Value result = left + expr->EvaluateOperand2(xlocals);
|
Value result = left + expr->EvaluateOperand2(xlocals);
|
||||||
|
|
||||||
xlocals->Remove("__parent");
|
if (exp_right->m_Operator == &AExpression::OpDict) {
|
||||||
|
Dictionary::Ptr dict = result;
|
||||||
|
dict->Remove("__parent");
|
||||||
|
}
|
||||||
|
|
||||||
locals->Set(expr->m_Operand1, result);
|
locals->Set(expr->m_Operand1, result);
|
||||||
return result;
|
return result;
|
||||||
@ -391,7 +394,10 @@ Value AExpression::OpSetMinus(const AExpression *expr, const Dictionary::Ptr& lo
|
|||||||
|
|
||||||
Value result = left - expr->EvaluateOperand2(xlocals);
|
Value result = left - expr->EvaluateOperand2(xlocals);
|
||||||
|
|
||||||
xlocals->Remove("__parent");
|
if (exp_right->m_Operator == &AExpression::OpDict) {
|
||||||
|
Dictionary::Ptr dict = result;
|
||||||
|
dict->Remove("__parent");
|
||||||
|
}
|
||||||
|
|
||||||
locals->Set(expr->m_Operand1, result);
|
locals->Set(expr->m_Operand1, result);
|
||||||
return result;
|
return result;
|
||||||
@ -414,7 +420,10 @@ Value AExpression::OpSetMultiply(const AExpression *expr, const Dictionary::Ptr&
|
|||||||
|
|
||||||
Value result = left * expr->EvaluateOperand2(xlocals);
|
Value result = left * expr->EvaluateOperand2(xlocals);
|
||||||
|
|
||||||
xlocals->Remove("__parent");
|
if (exp_right->m_Operator == &AExpression::OpDict) {
|
||||||
|
Dictionary::Ptr dict = result;
|
||||||
|
dict->Remove("__parent");
|
||||||
|
}
|
||||||
|
|
||||||
locals->Set(expr->m_Operand1, result);
|
locals->Set(expr->m_Operand1, result);
|
||||||
return result;
|
return result;
|
||||||
@ -437,7 +446,10 @@ Value AExpression::OpSetDivide(const AExpression *expr, const Dictionary::Ptr& l
|
|||||||
|
|
||||||
Value result = left / expr->EvaluateOperand2(xlocals);
|
Value result = left / expr->EvaluateOperand2(xlocals);
|
||||||
|
|
||||||
xlocals->Remove("__parent");
|
if (exp_right->m_Operator == &AExpression::OpDict) {
|
||||||
|
Dictionary::Ptr dict = result;
|
||||||
|
dict->Remove("__parent");
|
||||||
|
}
|
||||||
|
|
||||||
locals->Set(expr->m_Operand1, result);
|
locals->Set(expr->m_Operand1, result);
|
||||||
return result;
|
return result;
|
||||||
|
@ -157,6 +157,8 @@ Dictionary::Ptr ConfigItem::GetProperties(void)
|
|||||||
m_Properties->Set("__parent", m_Scope);
|
m_Properties->Set("__parent", m_Scope);
|
||||||
GetLinkedExpressionList()->Evaluate(m_Properties);
|
GetLinkedExpressionList()->Evaluate(m_Properties);
|
||||||
m_Properties->Remove("__parent");
|
m_Properties->Remove("__parent");
|
||||||
|
|
||||||
|
VERIFY(m_Properties->Get("__type") == GetType() && m_Properties->Get("__name") == GetName());
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_Properties;
|
return m_Properties;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user