mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-28 08:04:14 +02:00
parent
b367187c0b
commit
bd8ccec258
@ -263,8 +263,9 @@ Value AExpression::OpFunctionCall(const AExpression *expr, const Dictionary::Ptr
|
|||||||
|
|
||||||
Array::Ptr arr = expr->EvaluateOperand2(locals);
|
Array::Ptr arr = expr->EvaluateOperand2(locals);
|
||||||
std::vector<Value> arguments;
|
std::vector<Value> arguments;
|
||||||
ObjectLock olock(arr);
|
int index = 0;
|
||||||
BOOST_FOREACH(const AExpression::Ptr& aexpr, arr) {
|
for (int index = 0; index < arr->GetLength(); index++) {
|
||||||
|
const AExpression::Ptr& aexpr = arr->Get(index);
|
||||||
arguments.push_back(aexpr->Evaluate(locals));
|
arguments.push_back(aexpr->Evaluate(locals));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -277,8 +278,9 @@ Value AExpression::OpArray(const AExpression *expr, const Dictionary::Ptr& local
|
|||||||
Array::Ptr result = make_shared<Array>();
|
Array::Ptr result = make_shared<Array>();
|
||||||
|
|
||||||
if (arr) {
|
if (arr) {
|
||||||
ObjectLock olock(arr);
|
int index = 0;
|
||||||
BOOST_FOREACH(const AExpression::Ptr& aexpr, arr) {
|
for (int index = 0; index < arr->GetLength(); index++) {
|
||||||
|
const AExpression::Ptr& aexpr = arr->Get(index);
|
||||||
result->Add(aexpr->Evaluate(locals));
|
result->Add(aexpr->Evaluate(locals));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -295,8 +297,9 @@ Value AExpression::OpDict(const AExpression *expr, const Dictionary::Ptr& locals
|
|||||||
result->Set("__parent", locals);
|
result->Set("__parent", locals);
|
||||||
|
|
||||||
if (arr) {
|
if (arr) {
|
||||||
ObjectLock olock(arr);
|
int index = 0;
|
||||||
BOOST_FOREACH(const AExpression::Ptr& aexpr, arr) {
|
for (int index = 0; index < arr->GetLength(); index++) {
|
||||||
|
const AExpression::Ptr& aexpr = arr->Get(index);
|
||||||
Dictionary::Ptr alocals = in_place ? locals : result;
|
Dictionary::Ptr alocals = in_place ? locals : result;
|
||||||
aexpr->Evaluate(alocals);
|
aexpr->Evaluate(alocals);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user