summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-03-19 03:25:55 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2022-03-19 03:30:54 -0400
commit08b42791ffddec7c51a3e887654f4d476d780b91 (patch)
treefe4f55d411424ef6785c287973f50ad74c8096b2 /apps
parentddbca125a61ae25ffd0acb782d585b9318f4d072 (diff)
downloadrockbox-08b42791ffddec7c51a3e887654f4d476d780b91.tar.gz
rockbox-08b42791ffddec7c51a3e887654f4d476d780b91.zip
tag_cache.c optimize str_begins_ends_oneof
the function is shared Change-Id: I362a75ea5a39690647df4f421d9429ef2114ef02
Diffstat (limited to 'apps')
-rw-r--r--apps/tagcache.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/tagcache.c b/apps/tagcache.c
index 5a80885819..f49a67924e 100644
--- a/apps/tagcache.c
+++ b/apps/tagcache.c
@@ -1126,10 +1126,11 @@ static bool check_against_clause(long numeric, const char *str,
1126 return !str_ends_with(str, clause->str); 1126 return !str_ends_with(str, clause->str);
1127 case clause_oneof: 1127 case clause_oneof:
1128 return str_oneof(str, clause->str); 1128 return str_oneof(str, clause->str);
1129 case clause_begins_oneof:
1130 return str_begins_ends_oneof(str, clause->str, true);
1131 case clause_ends_oneof: 1129 case clause_ends_oneof:
1132 return str_begins_ends_oneof(str, clause->str, false); 1130 /* Fall-Through */
1131 case clause_begins_oneof:
1132 return str_begins_ends_oneof(str, clause->str,
1133 clause->type == clause_begins_oneof);
1133 default: 1134 default:
1134 logf("Incorrect tag: %d", clause->type); 1135 logf("Incorrect tag: %d", clause->type);
1135 } 1136 }