Commit b0b250a2 authored by Geoff Simmons's avatar Geoff Simmons

Revert "Prune the QP prefix sub-branch search more efficiently."

This reverts commit afded0f5.
parent 36b01633
...@@ -458,14 +458,15 @@ QP_Prefixes(const struct qp_y * const restrict root, ...@@ -458,14 +458,15 @@ QP_Prefixes(const struct qp_y * const restrict root,
continue; continue;
yy = y->branch[i]; yy = y->branch[i];
CHECK_OBJ_NOTNULL(yy, QP_Y_MAGIC); CHECK_OBJ_NOTNULL(yy, QP_Y_MAGIC);
if (!yy->term || yy->off + yy-> len != l) if (yy->off + yy-> len != l)
continue; continue;
if (strncmp(subject, strings[yy->idx], l) != 0) if (yy->term) {
return (0); if (strncmp(subject, strings[yy->idx], l) != 0)
assert(l != len); return (0);
if (update_match(match, yy->idx, len, l) != 0) assert(l != len);
return (-1); if (update_match(match, yy->idx, len, l) != 0)
break; return (-1);
}
} }
if (idx == -1) if (idx == -1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment