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 #ifdef ENABLE_DATABASE
SongLoader::SongLoader(const Client &_client) SongLoader::SongLoader(const Client &_client) noexcept
:client(&_client), db(_client.GetDatabase()), :client(&_client), db(_client.GetDatabase()),
storage(_client.GetStorage()) {} storage(_client.GetStorage()) {}

View File

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