archive/Plugin: return std::unique_ptr<ArchiveFile>

This commit is contained in:
Max Kellermann
2017-12-27 09:07:21 +01:00
parent 5a728a069e
commit 2e0949d8e6
8 changed files with 16 additions and 20 deletions

View File

@@ -89,11 +89,10 @@ try {
int result = EXIT_SUCCESS;
ArchiveFile *file = archive_file_open(plugin, path);
auto file = archive_file_open(plugin, path);
MyArchiveVisitor visitor;
file->Visit(visitor);
delete file;
return result;
} catch (const std::exception &e) {