Remove some functions which were rendered trivial by xiaq's changes. Make io_file_t take its path directly. Make io_buffer_t no longer use a shared_ptr for its data.

This commit is contained in:
ridiculousfish
2013-01-19 10:59:43 -08:00
parent f850c021b7
commit 98a17f4046
5 changed files with 18 additions and 75 deletions

22
io.cpp
View File

@@ -135,7 +135,6 @@ io_buffer_t *io_buffer_t::create(bool is_input)
{
bool success = true;
io_buffer_t *buffer_redirect = new io_buffer_t(is_input ? 0 : 1, is_input);
buffer_redirect->out_buffer_create();
if (exec_pipe(buffer_redirect->pipe_fd) == -1)
{
@@ -194,17 +193,6 @@ void io_chain_t::remove(const shared_ptr<const io_data_t> &element)
}
}
void io_chain_t::duplicate_prepend(const io_chain_t &src)
{
/* Prepend a duplicate of src before this. */
this->insert(this->begin(), src.begin(), src.end());
}
void io_chain_t::destroy()
{
this->clear();
}
void io_remove(io_chain_t &list, const shared_ptr<const io_data_t> &element)
{
list.remove(element);
@@ -227,16 +215,6 @@ void io_print(const io_chain_t &chain)
}
}
void io_duplicate_prepend(const io_chain_t &src, io_chain_t &dst)
{
return dst.duplicate_prepend(src);
}
void io_chain_destroy(io_chain_t &chain)
{
chain.destroy();
}
/* Return the last IO for the given fd */
shared_ptr<const io_data_t> io_chain_t::get_io_for_fd(int fd) const
{