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

@@ -116,10 +116,10 @@ Iso9660ArchiveFile::Visit(char *path, size_t length, size_t capacity,
_cdio_list_free (entlist, true);
}
static ArchiveFile *
static std::unique_ptr<ArchiveFile>
iso9660_archive_open(Path pathname)
{
return new Iso9660ArchiveFile(std::make_shared<Iso9660>(pathname));
return std::make_unique<Iso9660ArchiveFile>(std::make_shared<Iso9660>(pathname));
}
void