Fixes and improvements

This commit is contained in:
Wojciech Figat
2021-11-18 11:21:30 +01:00
parent 2a2b70f83f
commit cdcb2f8f7a
15 changed files with 46 additions and 48 deletions

View File

@@ -1323,18 +1323,3 @@ void VisjectExecutor::ProcessGroupCollections(Box* box, Node* node, Value& value
}
}
}
VisjectExecutor::Value VisjectExecutor::tryGetValue(Box* box, int32 defaultValueBoxIndex, const Value& defaultValue)
{
const auto parentNode = box->GetParent<Node>();
if (box->HasConnection())
return eatBox(parentNode, box->FirstConnection());
if (parentNode->Values.Count() > defaultValueBoxIndex)
return Value(parentNode->Values[defaultValueBoxIndex]);
return defaultValue;
}
VisjectExecutor::Value VisjectExecutor::tryGetValue(Box* box, const Value& defaultValue)
{
return box && box->HasConnection() ? eatBox(box->GetParent<Node>(), box->FirstConnection()) : defaultValue;
}