Commit d64edb68 authored by Max Kellermann's avatar Max Kellermann

db/simple: GetRoot() returns reference

parent 3f9ad8e1
...@@ -58,10 +58,10 @@ public: ...@@ -58,10 +58,10 @@ public:
Error &error); Error &error);
gcc_pure gcc_pure
Directory *GetRoot() { Directory &GetRoot() {
assert(root != NULL); assert(root != NULL);
return root; return *root;
} }
bool Save(Error &error); bool Save(Error &error);
......
...@@ -84,7 +84,7 @@ UpdateService::Task() ...@@ -84,7 +84,7 @@ UpdateService::Task()
SetThreadIdlePriority(); SetThreadIdlePriority();
modified = walk->Walk(*db.GetRoot(), next.path_utf8.c_str(), modified = walk->Walk(db.GetRoot(), next.path_utf8.c_str(),
next.discard); next.discard);
if (modified || !db.FileExists()) { if (modified || !db.FileExists()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment