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

@@ -102,13 +102,13 @@ Bzip2InputStream::Open()
/* archive open && listing routine */
static ArchiveFile *
static std::unique_ptr<ArchiveFile>
bz2_open(Path pathname)
{
static Mutex mutex;
static Cond cond;
auto is = OpenLocalInputStream(pathname, mutex, cond);
return new Bzip2ArchiveFile(pathname, std::move(is));
return std::make_unique<Bzip2ArchiveFile>(pathname, std::move(is));
}
/* single archive handling */