playlist/Plugin: remove useless wrapper functions

This commit is contained in:
Max Kellermann 2018-01-20 19:58:11 +01:00
parent b8e5932506
commit 147f64e1fc
2 changed files with 4 additions and 22 deletions

View File

@ -96,18 +96,4 @@ playlist_plugin_finish(const struct playlist_plugin *plugin)
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

View File

@ -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 &&
plugin->schemes != nullptr &&
StringArrayContainsCase(plugin->schemes, scheme.c_str())) {
playlist = playlist_plugin_open_uri(plugin, uri,
mutex, cond);
playlist = plugin->open_uri(uri, mutex, cond);
if (playlist != nullptr)
break;
@ -152,8 +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 &&
StringArrayContainsCase(plugin->suffixes, suffix)) {
playlist = playlist_plugin_open_uri(plugin, uri,
mutex, cond);
playlist = plugin->open_uri(uri, mutex, cond);
if (playlist != nullptr)
break;
}
@ -197,8 +195,7 @@ playlist_list_open_stream_mime2(InputStreamPtr &&is, const char *mime)
} catch (...) {
}
auto playlist = playlist_plugin_open_stream(plugin,
std::move(is));
auto playlist = plugin->open_stream(std::move(is));
if (playlist != nullptr)
return playlist;
}
@ -241,8 +238,7 @@ playlist_list_open_stream_suffix(InputStreamPtr &&is, const char *suffix)
} catch (...) {
}
auto playlist = playlist_plugin_open_stream(plugin,
std::move(is));
auto playlist = plugin->open_stream(std::move(is));
if (playlist != nullptr)
return playlist;
}