diff options
author | Max Kellermann <max@duempel.org> | 2015-10-19 15:57:00 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-10-19 15:57:30 +0200 |
commit | 8d2370635408b9acd392843de96179383a95a4bf (patch) | |
tree | 7c1572bedb11ffea8eb8dfaa9a4c78a3e1c64d2f /src/db/plugins/simple/Directory.cxx | |
parent | 62bfb1a2731ba6c7ee27009316109ef03a60d950 (diff) | |
download | mpd-8d2370635408b9acd392843de96179383a95a4bf.tar.gz mpd-8d2370635408b9acd392843de96179383a95a4bf.tar.xz mpd-8d2370635408b9acd392843de96179383a95a4bf.zip |
util/DeleteDisposer: new utility class
Diffstat (limited to '')
-rw-r--r-- | src/db/plugins/simple/Directory.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/db/plugins/simple/Directory.cxx b/src/db/plugins/simple/Directory.cxx index b795ee713..0c2b19efb 100644 --- a/src/db/plugins/simple/Directory.cxx +++ b/src/db/plugins/simple/Directory.cxx @@ -31,6 +31,7 @@ #include "lib/icu/Collate.hxx" #include "fs/Traits.hxx" #include "util/Alloc.hxx" +#include "util/DeleteDisposer.hxx" #include "util/Error.hxx" #include <assert.h> @@ -51,7 +52,7 @@ Directory::~Directory() delete mounted_database; songs.clear_and_dispose(Song::Disposer()); - children.clear_and_dispose(Disposer()); + children.clear_and_dispose(DeleteDisposer()); } void @@ -61,7 +62,7 @@ Directory::Delete() assert(parent != nullptr); parent->children.erase_and_dispose(parent->children.iterator_to(*this), - Disposer()); + DeleteDisposer()); } const char * @@ -110,7 +111,8 @@ Directory::PruneEmpty() child->PruneEmpty(); if (child->IsEmpty()) - child = children.erase_and_dispose(child, Disposer()); + child = children.erase_and_dispose(child, + DeleteDisposer()); else ++child; } |