mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-21 20:54:35 +02:00
parent
3032cf8100
commit
4ec939f332
@ -357,9 +357,14 @@ Value AExpression::OpSetPlus(const AExpression *expr, const Dictionary::Ptr& loc
|
|||||||
|
|
||||||
if (!xlocals)
|
if (!xlocals)
|
||||||
xlocals = make_shared<Dictionary>();
|
xlocals = make_shared<Dictionary>();
|
||||||
|
|
||||||
|
xlocals->Set("__parent", locals);
|
||||||
}
|
}
|
||||||
|
|
||||||
Value result = left + expr->EvaluateOperand2(xlocals);
|
Value result = left + expr->EvaluateOperand2(xlocals);
|
||||||
|
|
||||||
|
xlocals->Remove("__parent");
|
||||||
|
|
||||||
locals->Set(expr->m_Operand1, result);
|
locals->Set(expr->m_Operand1, result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -375,9 +380,14 @@ Value AExpression::OpSetMinus(const AExpression *expr, const Dictionary::Ptr& lo
|
|||||||
|
|
||||||
if (!xlocals)
|
if (!xlocals)
|
||||||
xlocals = make_shared<Dictionary>();
|
xlocals = make_shared<Dictionary>();
|
||||||
|
|
||||||
|
xlocals->Set("__parent", locals);
|
||||||
}
|
}
|
||||||
|
|
||||||
Value result = left - expr->EvaluateOperand2(xlocals);
|
Value result = left - expr->EvaluateOperand2(xlocals);
|
||||||
|
|
||||||
|
xlocals->Remove("__parent");
|
||||||
|
|
||||||
locals->Set(expr->m_Operand1, result);
|
locals->Set(expr->m_Operand1, result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -393,9 +403,14 @@ Value AExpression::OpSetMultiply(const AExpression *expr, const Dictionary::Ptr&
|
|||||||
|
|
||||||
if (!xlocals)
|
if (!xlocals)
|
||||||
xlocals = make_shared<Dictionary>();
|
xlocals = make_shared<Dictionary>();
|
||||||
|
|
||||||
|
xlocals->Set("__parent", locals);
|
||||||
}
|
}
|
||||||
|
|
||||||
Value result = left * expr->EvaluateOperand2(xlocals);
|
Value result = left * expr->EvaluateOperand2(xlocals);
|
||||||
|
|
||||||
|
xlocals->Remove("__parent");
|
||||||
|
|
||||||
locals->Set(expr->m_Operand1, result);
|
locals->Set(expr->m_Operand1, result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -411,9 +426,14 @@ Value AExpression::OpSetDivide(const AExpression *expr, const Dictionary::Ptr& l
|
|||||||
|
|
||||||
if (!xlocals)
|
if (!xlocals)
|
||||||
xlocals = make_shared<Dictionary>();
|
xlocals = make_shared<Dictionary>();
|
||||||
|
|
||||||
|
xlocals->Set("__parent", locals);
|
||||||
}
|
}
|
||||||
|
|
||||||
Value result = left / expr->EvaluateOperand2(xlocals);
|
Value result = left / expr->EvaluateOperand2(xlocals);
|
||||||
|
|
||||||
|
xlocals->Remove("__parent");
|
||||||
|
|
||||||
locals->Set(expr->m_Operand1, result);
|
locals->Set(expr->m_Operand1, result);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user