aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/DatabaseGlue.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-04 08:37:05 +0100
committerMax Kellermann <max@duempel.org>2014-02-04 09:05:32 +0100
commitd76b6f878e06d052ab54415783c39997939349e0 (patch)
tree954eb15c6a1f8eaa033285df551f355f6973d758 /src/db/DatabaseGlue.cxx
parentf25ef8d6825c03aec4569c6ad4b9bfb3a9f5d78d (diff)
downloadmpd-d76b6f878e06d052ab54415783c39997939349e0.tar.gz
mpd-d76b6f878e06d052ab54415783c39997939349e0.tar.xz
mpd-d76b6f878e06d052ab54415783c39997939349e0.zip
db/update/Service: add SimpleDatabase reference
Don't use the global variables from the DatabaseSimple library.
Diffstat (limited to '')
-rw-r--r--src/db/DatabaseGlue.cxx18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/db/DatabaseGlue.cxx b/src/db/DatabaseGlue.cxx
index b8aae5be5..f320633c7 100644
--- a/src/db/DatabaseGlue.cxx
+++ b/src/db/DatabaseGlue.cxx
@@ -95,23 +95,13 @@ db_is_simple(void)
return is_simple;
}
-Directory *
-db_get_root(void)
+SimpleDatabase &
+db_get_simple()
{
+ assert(is_simple);
assert(db != nullptr);
- assert(db_is_simple());
-
- return ((SimpleDatabase *)db)->GetRoot();
-}
-
-bool
-db_save(Error &error)
-{
- assert(db != nullptr);
- assert(db_is_open);
- assert(db_is_simple());
- return ((SimpleDatabase *)db)->Save(error);
+ return *(SimpleDatabase *)db;
}
bool