aboutsummaryrefslogtreecommitdiffhomepage
path: root/io.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-08-18 16:55:01 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-08-19 18:06:24 -0700
commite849beabbab31c83ac57693cb0a7ac1e58f8cfd5 (patch)
treefa8872516ac378bd32ef3be5844100bc64cf4c1b /io.cpp
parent2979d3bf169f51fb2ba218897994745754f830f9 (diff)
Initial work towards various IO cleanups with an eye to fixing https://github.com/fish-shell/fish-shell/issues/110
Diffstat (limited to 'io.cpp')
-rw-r--r--io.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/io.cpp b/io.cpp
index da1ebb0c..2882a59a 100644
--- a/io.cpp
+++ b/io.cpp
@@ -202,6 +202,12 @@ void io_chain_t::push_back(const shared_ptr<io_data_t> &element)
std::vector<shared_ptr<io_data_t> >::push_back(element);
}
+void io_chain_t::push_front(const shared_ptr<io_data_t> &element)
+{
+ assert(element.get() != NULL);
+ this->insert(this->begin(), element);
+}
+
void io_remove(io_chain_t &list, const shared_ptr<const io_data_t> &element)
{
list.remove(element);