diff options
author | Max Kellermann <max@duempel.org> | 2013-10-19 18:19:03 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-19 18:19:03 +0200 |
commit | 59f8144c50765189594d5932fc25869f9ea6e265 (patch) | |
tree | f460d9f46a99040dea402bcb3ad2d84a0e734285 /src/db | |
parent | 5a7c931293b55a27c3f79c6951707a8d6e2a5f6c (diff) | |
download | mpd-59f8144c50765189594d5932fc25869f9ea6e265.tar.gz mpd-59f8144c50765189594d5932fc25869f9ea6e265.tar.xz mpd-59f8144c50765189594d5932fc25869f9ea6e265.zip |
*: use nullptr instead of NULL
Diffstat (limited to '')
-rw-r--r-- | src/db/SimpleDatabasePlugin.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/db/SimpleDatabasePlugin.cxx b/src/db/SimpleDatabasePlugin.cxx index 567c62b6f..8f2571878 100644 --- a/src/db/SimpleDatabasePlugin.cxx +++ b/src/db/SimpleDatabasePlugin.cxx @@ -44,7 +44,7 @@ SimpleDatabase::Create(const config_param ¶m, Error &error) SimpleDatabase *db = new SimpleDatabase(); if (!db->Configure(param, error)) { delete db; - db = NULL; + db = nullptr; } return db; @@ -136,7 +136,7 @@ bool SimpleDatabase::Load(Error &error) { assert(!path.IsNull()); - assert(root != NULL); + assert(root != nullptr); TextFile file(path); if (file.HasFailed()) { @@ -183,7 +183,7 @@ SimpleDatabase::Open(Error &error) void SimpleDatabase::Close() { - assert(root != NULL); + assert(root != nullptr); assert(borrowed_song_count == 0); root->Free(); @@ -192,12 +192,12 @@ SimpleDatabase::Close() Song * SimpleDatabase::GetSong(const char *uri, Error &error) const { - assert(root != NULL); + assert(root != nullptr); db_lock(); Song *song = root->LookupSong(uri); db_unlock(); - if (song == NULL) + if (song == nullptr) error.Format(db_domain, DB_NOT_FOUND, "No such song: %s", uri); #ifndef NDEBUG @@ -223,8 +223,8 @@ gcc_pure const Directory * SimpleDatabase::LookupDirectory(const char *uri) const { - assert(root != NULL); - assert(uri != NULL); + assert(root != nullptr); + assert(uri != nullptr); ScopeDatabaseLock protect; return root->LookupDirectory(uri); @@ -240,7 +240,7 @@ SimpleDatabase::Visit(const DatabaseSelection &selection, ScopeDatabaseLock protect; const Directory *directory = root->LookupDirectory(selection.uri); - if (directory == NULL) { + if (directory == nullptr) { if (visit_song) { Song *song = root->LookupSong(selection.uri); if (song != nullptr) |