diff options
author | Max Kellermann <max@duempel.org> | 2013-01-03 02:12:34 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-03 02:12:34 +0100 |
commit | 83488848e1091024a0a307b1539c1a85762ee1f1 (patch) | |
tree | 1024049a769ceffeedd302b3bfee379d99c47018 | |
parent | f5a92d6cc39ea15ea8aa4cc35ee742a646b12508 (diff) | |
download | mpd-83488848e1091024a0a307b1539c1a85762ee1f1.tar.gz mpd-83488848e1091024a0a307b1539c1a85762ee1f1.tar.xz mpd-83488848e1091024a0a307b1539c1a85762ee1f1.zip |
Directory: initialise in default constructor
Diffstat (limited to '')
-rw-r--r-- | src/Directory.cxx | 9 | ||||
-rw-r--r-- | src/Directory.hxx | 2 | ||||
-rw-r--r-- | test/DumpPlaylist.cxx | 1 | ||||
-rw-r--r-- | test/TestQueuePriority.cxx | 1 |
4 files changed, 12 insertions, 1 deletions
diff --git a/src/Directory.cxx b/src/Directory.cxx index b67ad3de8..dec772c01 100644 --- a/src/Directory.cxx +++ b/src/Directory.cxx @@ -51,6 +51,15 @@ Directory::Allocate(const char *path) return directory; } +Directory::Directory() +{ + INIT_LIST_HEAD(&children); + INIT_LIST_HEAD(&songs); + INIT_LIST_HEAD(&playlists); + + path[0] = 0; +} + Directory::Directory(const char *_path) { INIT_LIST_HEAD(&children); diff --git a/src/Directory.hxx b/src/Directory.hxx index 3b2c6b1a3..ab23a6922 100644 --- a/src/Directory.hxx +++ b/src/Directory.hxx @@ -100,7 +100,7 @@ public: /** * Default constructor, needed for #detached_root. */ - Directory() = default; + Directory(); ~Directory(); /** diff --git a/test/DumpPlaylist.cxx b/test/DumpPlaylist.cxx index 612f54827..427052b6c 100644 --- a/test/DumpPlaylist.cxx +++ b/test/DumpPlaylist.cxx @@ -38,6 +38,7 @@ extern "C" { #include <unistd.h> #include <stdlib.h> +Directory::Directory() {} Directory::~Directory() {} static void diff --git a/test/TestQueuePriority.cxx b/test/TestQueuePriority.cxx index 01f39a006..6d994176f 100644 --- a/test/TestQueuePriority.cxx +++ b/test/TestQueuePriority.cxx @@ -7,6 +7,7 @@ extern "C" { Directory detached_root; +Directory::Directory() {} Directory::~Directory() {} struct song * |