diff options
-rw-r--r-- | src/archive/ArchiveList.cxx | 2 | ||||
-rw-r--r-- | src/config/ConfigParser.cxx | 4 | ||||
-rw-r--r-- | src/decoder/DecoderPlugin.cxx | 6 | ||||
-rw-r--r-- | src/playlist/PlaylistRegistry.cxx | 10 | ||||
-rw-r--r-- | src/util/StringUtil.cxx | 2 | ||||
-rw-r--r-- | src/util/StringUtil.hxx | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/src/archive/ArchiveList.cxx b/src/archive/ArchiveList.cxx index 05036c652..7f9e34d18 100644 --- a/src/archive/ArchiveList.cxx +++ b/src/archive/ArchiveList.cxx @@ -56,7 +56,7 @@ archive_plugin_from_suffix(const char *suffix) archive_plugins_for_each_enabled(plugin) if (plugin->suffixes != nullptr && - string_array_contains(plugin->suffixes, suffix)) + StringArrayContainsCase(plugin->suffixes, suffix)) return plugin; return nullptr; diff --git a/src/config/ConfigParser.cxx b/src/config/ConfigParser.cxx index d56cde19b..ebc681a66 100644 --- a/src/config/ConfigParser.cxx +++ b/src/config/ConfigParser.cxx @@ -26,12 +26,12 @@ get_bool(const char *value, bool *value_r) static const char *const t[] = { "yes", "true", "1", nullptr }; static const char *const f[] = { "no", "false", "0", nullptr }; - if (string_array_contains(t, value)) { + if (StringArrayContainsCase(t, value)) { *value_r = true; return true; } - if (string_array_contains(f, value)) { + if (StringArrayContainsCase(f, value)) { *value_r = false; return true; } diff --git a/src/decoder/DecoderPlugin.cxx b/src/decoder/DecoderPlugin.cxx index 294381204..fcb23e9a8 100644 --- a/src/decoder/DecoderPlugin.cxx +++ b/src/decoder/DecoderPlugin.cxx @@ -31,8 +31,8 @@ DecoderPlugin::SupportsSuffix(const char *suffix) const assert(suffix != nullptr); #endif - return suffixes != nullptr && string_array_contains(suffixes, suffix); - + return suffixes != nullptr && + StringArrayContainsCase(suffixes, suffix); } bool @@ -44,5 +44,5 @@ DecoderPlugin::SupportsMimeType(const char *mime_type) const #endif return mime_types != nullptr && - string_array_contains(mime_types, mime_type); + StringArrayContainsCase(mime_types, mime_type); } diff --git a/src/playlist/PlaylistRegistry.cxx b/src/playlist/PlaylistRegistry.cxx index f385b1c06..aca1d271a 100644 --- a/src/playlist/PlaylistRegistry.cxx +++ b/src/playlist/PlaylistRegistry.cxx @@ -120,7 +120,7 @@ playlist_list_open_uri_scheme(const char *uri, Mutex &mutex, Cond &cond, if (playlist_plugins_enabled[i] && plugin->open_uri != nullptr && plugin->schemes != nullptr && - string_array_contains(plugin->schemes, scheme.c_str())) { + StringArrayContainsCase(plugin->schemes, scheme.c_str())) { playlist = playlist_plugin_open_uri(plugin, uri, mutex, cond); if (playlist != nullptr) @@ -151,7 +151,7 @@ playlist_list_open_uri_suffix(const char *uri, Mutex &mutex, Cond &cond, if (playlist_plugins_enabled[i] && !tried[i] && plugin->open_uri != nullptr && plugin->suffixes != nullptr && - string_array_contains(plugin->suffixes, suffix)) { + StringArrayContainsCase(plugin->suffixes, suffix)) { playlist = playlist_plugin_open_uri(plugin, uri, mutex, cond); if (playlist != nullptr) @@ -189,7 +189,7 @@ playlist_list_open_stream_mime2(InputStreamPtr &&is, const char *mime) playlist_plugins_for_each_enabled(plugin) { if (plugin->open_stream != nullptr && plugin->mime_types != nullptr && - string_array_contains(plugin->mime_types, mime)) { + StringArrayContainsCase(plugin->mime_types, mime)) { /* rewind the stream, so each plugin gets a fresh start */ is->Rewind(IgnoreError()); @@ -230,7 +230,7 @@ playlist_list_open_stream_suffix(InputStreamPtr &&is, const char *suffix) playlist_plugins_for_each_enabled(plugin) { if (plugin->open_stream != nullptr && plugin->suffixes != nullptr && - string_array_contains(plugin->suffixes, suffix)) { + StringArrayContainsCase(plugin->suffixes, suffix)) { /* rewind the stream, so each plugin gets a fresh start */ is->Rewind(IgnoreError()); @@ -279,7 +279,7 @@ playlist_suffix_supported(const char *suffix) playlist_plugins_for_each_enabled(plugin) { if (plugin->suffixes != nullptr && - string_array_contains(plugin->suffixes, suffix)) + StringArrayContainsCase(plugin->suffixes, suffix)) return true; } diff --git a/src/util/StringUtil.cxx b/src/util/StringUtil.cxx index 62994bc18..5c2ec0e5a 100644 --- a/src/util/StringUtil.cxx +++ b/src/util/StringUtil.cxx @@ -91,7 +91,7 @@ Strip(char *p) } bool -string_array_contains(const char *const* haystack, const char *needle) +StringArrayContainsCase(const char *const*haystack, const char *needle) { assert(haystack != nullptr); assert(needle != nullptr); diff --git a/src/util/StringUtil.hxx b/src/util/StringUtil.hxx index 743626879..0a33b7971 100644 --- a/src/util/StringUtil.hxx +++ b/src/util/StringUtil.hxx @@ -104,7 +104,7 @@ Strip(char *p); */ gcc_pure bool -string_array_contains(const char *const* haystack, const char *needle); +StringArrayContainsCase(const char *const*haystack, const char *needle); /** * Convert the specified ASCII string (0x00..0x7f) to upper case. |