InputStream: add static method OpenReady()

Merge some duplicate code.
This commit is contained in:
Max Kellermann
2013-12-29 18:08:49 +01:00
parent ea9aff1d3f
commit aeb2baa495
11 changed files with 47 additions and 62 deletions

View File

@@ -146,7 +146,7 @@ bz2_open(const char *pathname, Error &error)
{
static Mutex mutex;
static Cond cond;
InputStream *is = InputStream::Open(pathname, mutex, cond, error);
InputStream *is = InputStream::OpenReady(pathname, mutex, cond, error);
if (is == nullptr)
return nullptr;