diff options
author | William Wilgus <wilgus.william@gmail.com> | 2021-10-23 02:34:18 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2021-10-23 02:45:54 -0400 |
commit | 36d319b084b7082f85196464959d0b9287967d6a (patch) | |
tree | 5ae1bdf121e6bae81526ca29c90c6461ddf2e06b /apps/open_plugin.h | |
parent | 789b2e089e72e3a6e61e40121e2efbb46723a1a9 (diff) | |
download | rockbox-36d319b084b7082f85196464959d0b9287967d6a.tar.gz rockbox-36d319b084b7082f85196464959d0b9287967d6a.zip |
Open Plugins Ignore hash for lang Ids
no need to look up a hash when we have another searchable field
remove some un-needed checks
Change-Id: I394e5f796a164aa4bcb68a56ca02cd6a7f18d332
Diffstat (limited to 'apps/open_plugin.h')
-rw-r--r-- | apps/open_plugin.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/open_plugin.h b/apps/open_plugin.h index adfb9a75bc..d16be2052c 100644 --- a/apps/open_plugin.h +++ b/apps/open_plugin.h | |||
@@ -67,11 +67,12 @@ struct open_plugin_entry_t | |||
67 | offsetof(struct open_plugin_entry_t, path) + \ | 67 | offsetof(struct open_plugin_entry_t, path) + \ |
68 | offsetof(struct open_plugin_entry_t, param)) | 68 | offsetof(struct open_plugin_entry_t, param)) |
69 | 69 | ||
70 | #define OPEN_PLUGIN_SEED 0x811C9DC5; //seed, 2166136261; | ||
70 | inline static void open_plugin_get_hash(const char *key, uint32_t *hash) | 71 | inline static void open_plugin_get_hash(const char *key, uint32_t *hash) |
71 | { | 72 | { |
72 | /* Calculate modified FNV1a hash of string */ | 73 | /* Calculate modified FNV1a hash of string */ |
73 | const uint32_t p = 16777619; | 74 | const uint32_t p = 16777619; |
74 | *hash = 0x811C9DC5; //seed, 2166136261; | 75 | *hash = OPEN_PLUGIN_SEED; |
75 | while(*key) | 76 | while(*key) |
76 | *hash = (*key++ ^ *hash) * p; | 77 | *hash = (*key++ ^ *hash) * p; |
77 | } | 78 | } |