diff options
author | Max Kellermann <max@duempel.org> | 2014-01-09 13:21:56 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-09 13:21:56 +0100 |
commit | 0c34555b02f5d24f8c836534dcc30005a42f2c95 (patch) | |
tree | e07b85d3e6b5b165002a0ff9822a7f6c07eb10b2 /src | |
parent | 83a988e2e48b85afe87c48f6a25d596b0c56054c (diff) | |
download | mpd-0c34555b02f5d24f8c836534dcc30005a42f2c95.tar.gz mpd-0c34555b02f5d24f8c836534dcc30005a42f2c95.tar.xz mpd-0c34555b02f5d24f8c836534dcc30005a42f2c95.zip |
Directory: remove method Free()
Diffstat (limited to '')
-rw-r--r-- | src/Directory.cxx | 4 | ||||
-rw-r--r-- | src/Directory.hxx | 8 | ||||
-rw-r--r-- | src/db/ProxyDatabasePlugin.cxx | 2 | ||||
-rw-r--r-- | src/db/SimpleDatabasePlugin.cxx | 4 |
4 files changed, 5 insertions, 13 deletions
diff --git a/src/Directory.cxx b/src/Directory.cxx index 87585818e..28c2c47e1 100644 --- a/src/Directory.cxx +++ b/src/Directory.cxx @@ -53,7 +53,7 @@ Directory::~Directory() Directory *child, *n; directory_for_each_child_safe(child, n, *this) - child->Free(); + delete child; } void @@ -63,7 +63,7 @@ Directory::Delete() assert(parent != nullptr); list_del(&siblings); - Free(); + delete this; } const char * diff --git a/src/Directory.hxx b/src/Directory.hxx index a8e3e32cb..031cca877 100644 --- a/src/Directory.hxx +++ b/src/Directory.hxx @@ -100,14 +100,6 @@ public: } /** - * Free this #Directory object (and the whole object tree within it), - * assuming it was already removed from the parent. - */ - void Free() { - delete this; - } - - /** * Remove this #Directory object from its parent and free it. This * must not be called with the root Directory. * diff --git a/src/db/ProxyDatabasePlugin.cxx b/src/db/ProxyDatabasePlugin.cxx index 20eb196a6..94ed72263 100644 --- a/src/db/ProxyDatabasePlugin.cxx +++ b/src/db/ProxyDatabasePlugin.cxx @@ -251,7 +251,7 @@ ProxyDatabase::Open(Error &error) void ProxyDatabase::Close() { - root->Free(); + delete root; if (connection != nullptr) mpd_connection_free(connection); diff --git a/src/db/SimpleDatabasePlugin.cxx b/src/db/SimpleDatabasePlugin.cxx index 7fc66ed67..a46aa60b2 100644 --- a/src/db/SimpleDatabasePlugin.cxx +++ b/src/db/SimpleDatabasePlugin.cxx @@ -168,7 +168,7 @@ SimpleDatabase::Open(Error &error) #endif if (!Load(error)) { - root->Free(); + delete root; LogError(error); error.Clear(); @@ -188,7 +188,7 @@ SimpleDatabase::Close() assert(root != nullptr); assert(borrowed_song_count == 0); - root->Free(); + delete root; } Song * |