db/simple: GetRoot() returns reference
This commit is contained in:
@@ -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()
|
|||||||
|
|
||||||
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()) {
|
||||||
|
Reference in New Issue
Block a user