Commit 147f64e1 authored by Max Kellermann's avatar Max Kellermann

playlist/Plugin: remove useless wrapper functions

parent b8e59325
...@@ -96,18 +96,4 @@ playlist_plugin_finish(const struct playlist_plugin *plugin) ...@@ -96,18 +96,4 @@ playlist_plugin_finish(const struct playlist_plugin *plugin)
plugin->finish(); plugin->finish();
} }
static inline SongEnumerator *
playlist_plugin_open_uri(const struct playlist_plugin *plugin, const char *uri,
Mutex &mutex, Cond &cond)
{
return plugin->open_uri(uri, mutex, cond);
}
static inline SongEnumerator *
playlist_plugin_open_stream(const struct playlist_plugin *plugin,
InputStreamPtr &&is)
{
return plugin->open_stream(std::move(is));
}
#endif #endif
...@@ -121,8 +121,7 @@ playlist_list_open_uri_scheme(const char *uri, Mutex &mutex, Cond &cond, ...@@ -121,8 +121,7 @@ playlist_list_open_uri_scheme(const char *uri, Mutex &mutex, Cond &cond,
if (playlist_plugins_enabled[i] && plugin->open_uri != nullptr && if (playlist_plugins_enabled[i] && plugin->open_uri != nullptr &&
plugin->schemes != nullptr && plugin->schemes != nullptr &&
StringArrayContainsCase(plugin->schemes, scheme.c_str())) { StringArrayContainsCase(plugin->schemes, scheme.c_str())) {
playlist = playlist_plugin_open_uri(plugin, uri, playlist = plugin->open_uri(uri, mutex, cond);
mutex, cond);
if (playlist != nullptr) if (playlist != nullptr)
break; break;
...@@ -152,8 +151,7 @@ playlist_list_open_uri_suffix(const char *uri, Mutex &mutex, Cond &cond, ...@@ -152,8 +151,7 @@ playlist_list_open_uri_suffix(const char *uri, Mutex &mutex, Cond &cond,
if (playlist_plugins_enabled[i] && !tried[i] && if (playlist_plugins_enabled[i] && !tried[i] &&
plugin->open_uri != nullptr && plugin->suffixes != nullptr && plugin->open_uri != nullptr && plugin->suffixes != nullptr &&
StringArrayContainsCase(plugin->suffixes, suffix)) { StringArrayContainsCase(plugin->suffixes, suffix)) {
playlist = playlist_plugin_open_uri(plugin, uri, playlist = plugin->open_uri(uri, mutex, cond);
mutex, cond);
if (playlist != nullptr) if (playlist != nullptr)
break; break;
} }
...@@ -197,8 +195,7 @@ playlist_list_open_stream_mime2(InputStreamPtr &&is, const char *mime) ...@@ -197,8 +195,7 @@ playlist_list_open_stream_mime2(InputStreamPtr &&is, const char *mime)
} catch (...) { } catch (...) {
} }
auto playlist = playlist_plugin_open_stream(plugin, auto playlist = plugin->open_stream(std::move(is));
std::move(is));
if (playlist != nullptr) if (playlist != nullptr)
return playlist; return playlist;
} }
...@@ -241,8 +238,7 @@ playlist_list_open_stream_suffix(InputStreamPtr &&is, const char *suffix) ...@@ -241,8 +238,7 @@ playlist_list_open_stream_suffix(InputStreamPtr &&is, const char *suffix)
} catch (...) { } catch (...) {
} }
auto playlist = playlist_plugin_open_stream(plugin, auto playlist = plugin->open_stream(std::move(is));
std::move(is));
if (playlist != nullptr) if (playlist != nullptr)
return playlist; return playlist;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment