input/Plugin: add noexcept
This commit is contained in:
parent
2c05752071
commit
07e524509f
@ -63,7 +63,8 @@ constexpr static const char *whitelist[] = {
|
||||
};
|
||||
|
||||
bool
|
||||
protocol_is_whitelisted(const char *proto) {
|
||||
protocol_is_whitelisted(const char *proto) noexcept
|
||||
{
|
||||
auto begin = std::begin(whitelist);
|
||||
auto end = std::end(whitelist);
|
||||
return std::binary_search(begin, end, proto, [](const char* a, const char* b) {
|
||||
|
@ -56,7 +56,7 @@ struct InputPlugin {
|
||||
* Global deinitialization. Called once before MPD shuts
|
||||
* down (only if init() has returned true).
|
||||
*/
|
||||
void (*finish)();
|
||||
void (*finish)() noexcept;
|
||||
|
||||
/**
|
||||
* Attempt to open the given URI. Returns nullptr if the
|
||||
@ -69,7 +69,7 @@ struct InputPlugin {
|
||||
/**
|
||||
* return a set of supported protocols
|
||||
*/
|
||||
std::set<std::string> (*protocols)();
|
||||
std::set<std::string> (*protocols)() noexcept;
|
||||
|
||||
/**
|
||||
* Prepare a #RemoteTagScanner. The operation must be started
|
||||
@ -103,7 +103,8 @@ struct InputPlugin {
|
||||
}
|
||||
};
|
||||
|
||||
gcc_pure
|
||||
bool
|
||||
protocol_is_whitelisted(const char *proto);
|
||||
protocol_is_whitelisted(const char *proto) noexcept;
|
||||
|
||||
#endif
|
||||
|
@ -516,7 +516,8 @@ input_curl_open(const char *url, Mutex &mutex)
|
||||
}
|
||||
|
||||
static std::set<std::string>
|
||||
input_curl_protocols() {
|
||||
input_curl_protocols() noexcept
|
||||
{
|
||||
std::set<std::string> protocols;
|
||||
auto version_info = curl_version_info(CURLVERSION_FIRST);
|
||||
for (auto proto_ptr = version_info->protocols; *proto_ptr != nullptr; proto_ptr++) {
|
||||
|
@ -73,7 +73,8 @@ input_ffmpeg_init(EventLoop &, const ConfigBlock &)
|
||||
}
|
||||
|
||||
static std::set<std::string>
|
||||
input_ffmpeg_protocols() {
|
||||
input_ffmpeg_protocols() noexcept
|
||||
{
|
||||
void *opaque = nullptr;
|
||||
const char* protocol;
|
||||
std::set<std::string> protocols;
|
||||
|
@ -158,7 +158,7 @@ InitQobuzInput(EventLoop &event_loop, const ConfigBlock &block)
|
||||
}
|
||||
|
||||
static void
|
||||
FinishQobuzInput()
|
||||
FinishQobuzInput() noexcept
|
||||
{
|
||||
delete qobuz_client;
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ InitTidalInput(EventLoop &event_loop, const ConfigBlock &block)
|
||||
}
|
||||
|
||||
static void
|
||||
FinishTidalInput()
|
||||
FinishTidalInput() noexcept
|
||||
{
|
||||
delete tidal_session;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user