From 83488848e1091024a0a307b1539c1a85762ee1f1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 3 Jan 2013 02:12:34 +0100 Subject: Directory: initialise in default constructor --- src/Directory.cxx | 9 +++++++++ src/Directory.hxx | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src') 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(); /** -- cgit v1.2.3