From fc0508c047a0f2f928c559e1018c84c592451f9a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 11 Feb 2017 23:15:12 +0100 Subject: [PATCH] db/simple/Directory: use C++11 initializers --- src/db/plugins/simple/Directory.cxx | 5 +---- src/db/plugins/simple/Directory.hxx | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/db/plugins/simple/Directory.cxx b/src/db/plugins/simple/Directory.cxx index 8fb0f709e..afd1da96c 100644 --- a/src/db/plugins/simple/Directory.cxx +++ b/src/db/plugins/simple/Directory.cxx @@ -39,10 +39,7 @@ Directory::Directory(std::string &&_path_utf8, Directory *_parent) :parent(_parent), - mtime(0), - inode(0), device(0), - path(std::move(_path_utf8)), - mounted_database(nullptr) + path(std::move(_path_utf8)) { } diff --git a/src/db/plugins/simple/Directory.hxx b/src/db/plugins/simple/Directory.hxx index ee720108c..e1eb240ed 100644 --- a/src/db/plugins/simple/Directory.hxx +++ b/src/db/plugins/simple/Directory.hxx @@ -85,8 +85,8 @@ struct Directory { PlaylistVector playlists; Directory *parent; - time_t mtime; - unsigned inode, device; + time_t mtime = 0; + unsigned inode = 0, device = 0; std::string path; @@ -94,7 +94,7 @@ struct Directory { * If this is not nullptr, then this directory does not really * exist, but is a mount point for another #Database. */ - Database *mounted_database; + Database *mounted_database = nullptr; public: Directory(std::string &&_path_utf8, Directory *_parent);