* Use default values of job function arguments if they're not
specified in Hydra.
This commit is contained in:
parent
adbba3bbcb
commit
334c71cd07
|
@ -49,13 +49,17 @@ static void tryJobAlts(EvalState & state, XMLWriter & doc,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Formals::Formals_::iterator next = cur; ++next;
|
||||||
|
|
||||||
AutoArgs::const_iterator a = argsLeft.find(cur->name);
|
AutoArgs::const_iterator a = argsLeft.find(cur->name);
|
||||||
|
|
||||||
if (a == argsLeft.end())
|
if (a == argsLeft.end()) {
|
||||||
throw TypeError(format("job `%1%' requires an argument named `%2%'")
|
if (!cur->def)
|
||||||
% attrPath % cur->name);
|
throw TypeError(format("job `%1%' requires an argument named `%2%'")
|
||||||
|
% attrPath % cur->name);
|
||||||
Formals::Formals_::iterator next = cur; ++next;
|
tryJobAlts(state, doc, argsUsed, argsLeft, attrPath, fun, next, last, actualArgs);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int n = 0;
|
int n = 0;
|
||||||
foreach (ValueList::const_iterator, i, a->second) {
|
foreach (ValueList::const_iterator, i, a->second) {
|
||||||
|
|
Loading…
Reference in a new issue