Directory: initialise in default constructor

This commit is contained in:
Max Kellermann 2013-01-03 02:12:34 +01:00
parent f5a92d6cc3
commit 83488848e1
4 changed files with 12 additions and 1 deletions

View File

@ -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);

View File

@ -100,7 +100,7 @@ public:
/**
* Default constructor, needed for #detached_root.
*/
Directory() = default;
Directory();
~Directory();
/**

View File

@ -38,6 +38,7 @@ extern "C" {
#include <unistd.h>
#include <stdlib.h>
Directory::Directory() {}
Directory::~Directory() {}
static void

View File

@ -7,6 +7,7 @@ extern "C" {
Directory detached_root;
Directory::Directory() {}
Directory::~Directory() {}
struct song *