db/update/Archive: convert pointer to reference
This commit is contained in:
parent
177d3b0178
commit
97a9adcbec
@ -100,17 +100,17 @@ UpdateWalk::UpdateArchiveTree(ArchiveFile &archive, Directory &directory,
|
|||||||
class UpdateArchiveVisitor final : public ArchiveVisitor {
|
class UpdateArchiveVisitor final : public ArchiveVisitor {
|
||||||
UpdateWalk &walk;
|
UpdateWalk &walk;
|
||||||
ArchiveFile &archive;
|
ArchiveFile &archive;
|
||||||
Directory *directory;
|
Directory &directory;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
UpdateArchiveVisitor(UpdateWalk &_walk, ArchiveFile &_archive,
|
UpdateArchiveVisitor(UpdateWalk &_walk, ArchiveFile &_archive,
|
||||||
Directory *_directory) noexcept
|
Directory &_directory) noexcept
|
||||||
:walk(_walk), archive(_archive), directory(_directory) {}
|
:walk(_walk), archive(_archive), directory(_directory) {}
|
||||||
|
|
||||||
virtual void VisitArchiveEntry(const char *path_utf8) override {
|
virtual void VisitArchiveEntry(const char *path_utf8) override {
|
||||||
FormatDebug(update_domain,
|
FormatDebug(update_domain,
|
||||||
"adding archive file: %s", path_utf8);
|
"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());
|
FormatDebug(update_domain, "archive %s opened", path_fs.c_str());
|
||||||
|
|
||||||
UpdateArchiveVisitor visitor(*this, *file, directory);
|
UpdateArchiveVisitor visitor(*this, *file, *directory);
|
||||||
file->Visit(visitor);
|
file->Visit(visitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user