diff options
author | Max Kellermann <max@duempel.org> | 2014-02-01 00:26:34 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-02-04 11:22:33 +0100 |
commit | cf6281a5a758e4b93d67f7fd5804a8cff60ddbf9 (patch) | |
tree | 7368011b1ecf5ae6db6dcafb676fddf03ff9d823 /src/SongLoader.hxx | |
parent | f00710a57e80738c33255eaa1347ab776fbce869 (diff) | |
download | mpd-cf6281a5a758e4b93d67f7fd5804a8cff60ddbf9.tar.gz mpd-cf6281a5a758e4b93d67f7fd5804a8cff60ddbf9.tar.xz mpd-cf6281a5a758e4b93d67f7fd5804a8cff60ddbf9.zip |
Instance: add Database attribute
Move from db/DatabaseGlue.cxx, eliminating global variable.
Diffstat (limited to '')
-rw-r--r-- | src/SongLoader.hxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/SongLoader.hxx b/src/SongLoader.hxx index 997c0fb18..9914db8e6 100644 --- a/src/SongLoader.hxx +++ b/src/SongLoader.hxx @@ -45,19 +45,16 @@ class SongLoader { public: #ifdef ENABLE_DATABASE - SongLoader(const Client *_client, const Database *_db=nullptr) - :client(_client), db(_db) {} - explicit SongLoader(const Client &_client) - :client(&_client), db(nullptr) {} + explicit SongLoader(const Client &_client); explicit SongLoader(const Database *_db) :client(nullptr), db(_db) {} - explicit SongLoader(std::nullptr_t) - :client(nullptr), db(nullptr) {} + explicit SongLoader(const Client &_client, const Database *_db) + :client(&_client), db(_db) {} #else explicit SongLoader(const Client &_client) :client(&_client) {} - explicit SongLoader(const Client *_client) - :client(_client) {} + explicit SongLoader(std::nullptr_t) + :client(nullptr) {} #endif gcc_nonnull_all |