summaryrefslogtreecommitdiff
path: root/src/SongLoader.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-01 00:26:34 +0100
committerMax Kellermann <max@duempel.org>2014-02-04 11:22:33 +0100
commitcf6281a5a758e4b93d67f7fd5804a8cff60ddbf9 (patch)
tree7368011b1ecf5ae6db6dcafb676fddf03ff9d823 /src/SongLoader.hxx
parentf00710a57e80738c33255eaa1347ab776fbce869 (diff)
Instance: add Database attribute
Move from db/DatabaseGlue.cxx, eliminating global variable.
Diffstat (limited to 'src/SongLoader.hxx')
-rw-r--r--src/SongLoader.hxx13
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