SongLoader: add noexcept

This commit is contained in:
Max Kellermann 2023-11-25 22:56:49 +01:00
parent eb675ad1b1
commit f757dfdc4f
2 changed files with 7 additions and 7 deletions

View File

@ -14,7 +14,7 @@
#ifdef ENABLE_DATABASE
SongLoader::SongLoader(const Client &_client)
SongLoader::SongLoader(const Client &_client) noexcept
:client(&_client), db(_client.GetDatabase()),
storage(_client.GetStorage()) {}

View File

@ -31,21 +31,21 @@ class SongLoader {
public:
#ifdef ENABLE_DATABASE
explicit SongLoader(const Client &_client);
SongLoader(const Database *_db, const Storage *_storage)
explicit SongLoader(const Client &_client) noexcept;
SongLoader(const Database *_db, const Storage *_storage) noexcept
:client(nullptr), db(_db), storage(_storage) {}
SongLoader(const Client &_client, const Database *_db,
const Storage *_storage)
const Storage *_storage) noexcept
:client(&_client), db(_db), storage(_storage) {}
#else
explicit SongLoader(const Client &_client)
explicit SongLoader(const Client &_client) noexcept
:client(&_client) {}
explicit SongLoader(std::nullptr_t, std::nullptr_t)
explicit SongLoader(std::nullptr_t, std::nullptr_t) noexcept
:client(nullptr) {}
#endif
#ifdef ENABLE_DATABASE
const Storage *GetStorage() const {
const Storage *GetStorage() const noexcept {
return storage;
}
#endif