archive/File, input/Plugin: return InputStreamPtr

This commit is contained in:
Max Kellermann
2017-12-26 20:05:22 +01:00
parent 49619fbd77
commit 7bce6329e3
17 changed files with 60 additions and 63 deletions

View File

@@ -70,12 +70,12 @@ OpenFileInputStream(Path path,
POSIX_FADV_SEQUENTIAL);
#endif
return InputStreamPtr(new FileInputStream(path.ToUTF8().c_str(),
std::move(reader), info.GetSize(),
mutex, cond));
return std::make_unique<FileInputStream>(path.ToUTF8().c_str(),
std::move(reader), info.GetSize(),
mutex, cond);
}
static InputStream *
static InputStreamPtr
input_file_open(gcc_unused const char *filename,
gcc_unused Mutex &mutex, gcc_unused Cond &cond)
{