summaryrefslogtreecommitdiff
path: root/src/SongSave.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-19 18:19:03 +0200
committerMax Kellermann <max@duempel.org>2013-10-19 18:19:03 +0200
commit59f8144c50765189594d5932fc25869f9ea6e265 (patch)
treef460d9f46a99040dea402bcb3ad2d84a0e734285 /src/SongSave.cxx
parent5a7c931293b55a27c3f79c6951707a8d6e2a5f6c (diff)
*: use nullptr instead of NULL
Diffstat (limited to 'src/SongSave.cxx')
-rw-r--r--src/SongSave.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/SongSave.cxx b/src/SongSave.cxx
index 4992b5ead..def4ef341 100644
--- a/src/SongSave.cxx
+++ b/src/SongSave.cxx
@@ -57,7 +57,7 @@ Song *
song_load(TextFile &file, Directory *parent, const char *uri,
Error &error)
{
- Song *song = parent != NULL
+ Song *song = parent != nullptr
? Song::NewFile(uri, parent)
: Song::NewRemote(uri);
char *line, *colon;
@@ -66,15 +66,15 @@ song_load(TextFile &file, Directory *parent, const char *uri,
TagBuilder tag;
- while ((line = file.ReadLine()) != NULL &&
+ while ((line = file.ReadLine()) != nullptr &&
strcmp(line, SONG_END) != 0) {
colon = strchr(line, ':');
- if (colon == NULL || colon == line) {
+ if (colon == nullptr || colon == line) {
song->Free();
error.Format(song_save_domain,
"unknown line in db: %s", line);
- return NULL;
+ return nullptr;
}
*colon++ = 0;
@@ -93,13 +93,13 @@ song_load(TextFile &file, Directory *parent, const char *uri,
song->start_ms = strtoul(value, &endptr, 10);
if (*endptr == '-')
- song->end_ms = strtoul(endptr + 1, NULL, 10);
+ song->end_ms = strtoul(endptr + 1, nullptr, 10);
} else {
song->Free();
error.Format(song_save_domain,
"unknown line in db: %s", line);
- return NULL;
+ return nullptr;
}
}