Func: use class IntrusivePtr

This commit is contained in:
Max Kellermann 2020-03-02 19:31:58 +01:00
parent b18573c804
commit a0c831a1bd
15 changed files with 89 additions and 146 deletions

View file

@ -179,15 +179,9 @@ bool RuleConditionEval::DoMatch(Rule* rule, RuleEndpointState* state,
try
{
Val* val = id->ID_Val()->AsFunc()->Call(&args);
auto val = id->ID_Val()->AsFunc()->Call(&args);
if ( val )
{
result = val->AsBool();
Unref(val);
}
else
result = false;
result = val && val->AsBool();
}
catch ( InterpreterException& e )