forked from len0rd/rockbox
tag_cache.c optimize str_begins_ends_oneof
the function is shared Change-Id: I362a75ea5a39690647df4f421d9429ef2114ef02
This commit is contained in:
parent
ddbca125a6
commit
08b42791ff
1 changed files with 4 additions and 3 deletions
|
@ -1126,10 +1126,11 @@ static bool check_against_clause(long numeric, const char *str,
|
|||
return !str_ends_with(str, clause->str);
|
||||
case clause_oneof:
|
||||
return str_oneof(str, clause->str);
|
||||
case clause_begins_oneof:
|
||||
return str_begins_ends_oneof(str, clause->str, true);
|
||||
case clause_ends_oneof:
|
||||
return str_begins_ends_oneof(str, clause->str, false);
|
||||
/* Fall-Through */
|
||||
case clause_begins_oneof:
|
||||
return str_begins_ends_oneof(str, clause->str,
|
||||
clause->type == clause_begins_oneof);
|
||||
default:
|
||||
logf("Incorrect tag: %d", clause->type);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue