parser: small regex optimization

This commit is contained in:
djcb 2017-11-04 14:32:41 +02:00
parent f59c899ae5
commit f794cea6e7
1 changed files with 5 additions and 1 deletions

View File

@ -104,7 +104,11 @@ regex (const ProcIface::FieldInfoVec& fields, const std::string& v,
field.id, term)}));
}
}
return tree;
if (tree.children.empty())
return empty();
else
return tree;
} catch (...) {
// fallback