db/simple: GetRoot() returns reference

This commit is contained in:
Max Kellermann 2014-02-27 19:29:10 +01:00
parent 3f9ad8e104
commit d64edb6896
2 changed files with 3 additions and 3 deletions

View File

@ -58,10 +58,10 @@ public:
Error &error);
gcc_pure
Directory *GetRoot() {
Directory &GetRoot() {
assert(root != NULL);
return root;
return *root;
}
bool Save(Error &error);

View File

@ -84,7 +84,7 @@ UpdateService::Task()
SetThreadIdlePriority();
modified = walk->Walk(*db.GetRoot(), next.path_utf8.c_str(),
modified = walk->Walk(db.GetRoot(), next.path_utf8.c_str(),
next.discard);
if (modified || !db.FileExists()) {