input/{file,archive}: remove the dummy InputPlugin instances
These have no use, exception for creating an artificial dependency from input_plugins[] to all archive plugins.
This commit is contained in:
@@ -63,19 +63,3 @@ OpenArchiveInputStream(Path path, Mutex &mutex, Cond &cond)
|
||||
return archive_file_open(arplug, Path::FromFS(archive))
|
||||
->OpenStream(filename, mutex, cond);
|
||||
}
|
||||
|
||||
static InputStreamPtr
|
||||
input_archive_open(gcc_unused const char *filename,
|
||||
gcc_unused Mutex &mutex, gcc_unused Cond &cond)
|
||||
{
|
||||
/* dummy method; use OpenArchiveInputStream() instead */
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const InputPlugin input_plugin_archive = {
|
||||
"archive",
|
||||
nullptr,
|
||||
nullptr,
|
||||
input_archive_open,
|
||||
};
|
||||
|
||||
@@ -26,8 +26,6 @@ class Path;
|
||||
class Mutex;
|
||||
class Cond;
|
||||
|
||||
extern const struct InputPlugin input_plugin_archive;
|
||||
|
||||
InputStreamPtr
|
||||
OpenArchiveInputStream(Path path, Mutex &mutex, Cond &cond);
|
||||
|
||||
|
||||
@@ -75,15 +75,6 @@ OpenFileInputStream(Path path,
|
||||
mutex, cond);
|
||||
}
|
||||
|
||||
static InputStreamPtr
|
||||
input_file_open(gcc_unused const char *filename,
|
||||
gcc_unused Mutex &mutex, gcc_unused Cond &cond)
|
||||
{
|
||||
/* dummy method; use OpenFileInputStream() instead */
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
FileInputStream::Seek(offset_type new_offset)
|
||||
{
|
||||
@@ -108,10 +99,3 @@ FileInputStream::Read(void *ptr, size_t read_size)
|
||||
offset += nbytes;
|
||||
return nbytes;
|
||||
}
|
||||
|
||||
const InputPlugin input_plugin_file = {
|
||||
"file",
|
||||
nullptr,
|
||||
nullptr,
|
||||
input_file_open,
|
||||
};
|
||||
|
||||
@@ -26,8 +26,6 @@ class Path;
|
||||
class Mutex;
|
||||
class Cond;
|
||||
|
||||
extern const struct InputPlugin input_plugin_file;
|
||||
|
||||
InputStreamPtr
|
||||
OpenFileInputStream(Path path,
|
||||
Mutex &mutex, Cond &cond);
|
||||
|
||||
Reference in New Issue
Block a user