mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-21 19:41:14 -03:00
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:
22
io.cpp
22
io.cpp
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user