archive/File: eliminate Close(), make destructor virtual instead

This commit is contained in:
Max Kellermann
2017-12-22 16:30:17 +01:00
parent 5da455080b
commit 9aec2f019a
7 changed files with 4 additions and 23 deletions

View File

@@ -49,10 +49,6 @@ public:
name.erase(len - 4);
}
virtual void Close() override {
delete this;
}
virtual void Visit(ArchiveVisitor &visitor) override {
visitor.VisitArchiveEntry(name.c_str());
}

View File

@@ -72,10 +72,6 @@ public:
void Visit(char *path, size_t length, size_t capacity,
ArchiveVisitor &visitor);
virtual void Close() override {
delete this;
}
virtual void Visit(ArchiveVisitor &visitor) override;
InputStream *OpenStream(const char *path,

View File

@@ -57,10 +57,6 @@ public:
ZzipArchiveFile(std::shared_ptr<ZzipDir> &&_dir)
:dir(std::move(_dir)) {}
virtual void Close() override {
delete this;
}
virtual void Visit(ArchiveVisitor &visitor) override;
InputStream *OpenStream(const char *path,