aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/plugins/simple
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/db/plugins/simple/Directory.cxx8
-rw-r--r--src/db/plugins/simple/Directory.hxx6
2 files changed, 5 insertions, 9 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;
}
diff --git a/src/db/plugins/simple/Directory.hxx b/src/db/plugins/simple/Directory.hxx
index 115030a8c..bad4647a0 100644
--- a/src/db/plugins/simple/Directory.hxx
+++ b/src/db/plugins/simple/Directory.hxx
@@ -53,12 +53,6 @@ struct Directory {
typedef boost::intrusive::link_mode<link_mode> LinkMode;
typedef boost::intrusive::list_member_hook<LinkMode> Hook;
- struct Disposer {
- void operator()(Directory *directory) const {
- delete directory;
- }
- };
-
/**
* Pointers to the siblings of this directory within the
* parent directory. It is unused (undefined) in the root