diff --git a/src/SongLoader.cxx b/src/SongLoader.cxx index 1c5bd6016..303575db5 100644 --- a/src/SongLoader.cxx +++ b/src/SongLoader.cxx @@ -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()) {} diff --git a/src/SongLoader.hxx b/src/SongLoader.hxx index 0087d4530..eb4d18516 100644 --- a/src/SongLoader.hxx +++ b/src/SongLoader.hxx @@ -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