playlist/Plugin: remove useless wrapper functions
This commit is contained in:
parent
b8e5932506
commit
147f64e1fc
@ -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,
|
|||||||
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,
|
|||||||
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)
|
|||||||
} 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)
|
|||||||
} 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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user