db/update/Archive: convert pointer to reference

This commit is contained in:
Max Kellermann 2019-09-03 19:54:18 +02:00
parent 177d3b0178
commit 97a9adcbec

View File

@ -100,17 +100,17 @@ UpdateWalk::UpdateArchiveTree(ArchiveFile &archive, Directory &directory,
class UpdateArchiveVisitor final : public ArchiveVisitor {
UpdateWalk &walk;
ArchiveFile &archive;
Directory *directory;
Directory &directory;
public:
UpdateArchiveVisitor(UpdateWalk &_walk, ArchiveFile &_archive,
Directory *_directory) noexcept
Directory &_directory) noexcept
:walk(_walk), archive(_archive), directory(_directory) {}
virtual void VisitArchiveEntry(const char *path_utf8) override {
FormatDebug(update_domain,
"adding archive file: %s", path_utf8);
walk.UpdateArchiveTree(archive, *directory, path_utf8);
walk.UpdateArchiveTree(archive, directory, path_utf8);
}
};
@ -152,7 +152,7 @@ UpdateWalk::UpdateArchiveFile(Directory &parent, const char *name,
FormatDebug(update_domain, "archive %s opened", path_fs.c_str());
UpdateArchiveVisitor visitor(*this, *file, directory);
UpdateArchiveVisitor visitor(*this, *file, *directory);
file->Visit(visitor);
}