Micro optimization (probably not necessary)

This commit is contained in:
Bruce Hill 2021-07-27 00:16:15 -07:00
parent a5a456fab3
commit db969f34a9

View File

@ -98,9 +98,8 @@ static match_t *cache_lookup(def_t *defs, const char *str, pat_t *pat)
if (!cache.matches) return NULL;
size_t h = hash(str, pat) & (cache.size-1);
for (match_t *c = cache.matches[h]; c; c = c->cache_next) {
if (c->start == str && c->pat == pat && c->defs_id == defs->id) {
if (c->pat == pat && c->defs_id == defs->id && c->start == str)
return c;
}
}
return NULL;
}