diff --git a/exec.cpp b/exec.cpp index a19231b85..be384832d 100644 --- a/exec.cpp +++ b/exec.cpp @@ -397,7 +397,7 @@ static bool io_transmogrify(const io_chain_t &in_chain, io_chain_t &out_chain, s case IO_BUFFER: case IO_CLOSE: { - out.reset(new io_data_t(*in)); + out = in; break; } diff --git a/io.cpp b/io.cpp index ba81d06df..85408405c 100644 --- a/io.cpp +++ b/io.cpp @@ -172,7 +172,7 @@ io_chain_t io_chain_t::duplicate() const result.reserve(this->size()); for (io_chain_t::const_iterator iter = this->begin(); iter != this->end(); iter++) { - result.push_back(shared_ptr(new io_data_t(**iter))); + result.push_back(*iter); } return result; } @@ -183,7 +183,7 @@ void io_chain_t::duplicate_prepend(const io_chain_t &src) this->insert(this->begin(), src.size(), shared_ptr()); for (size_t idx = 0; idx < src.size(); idx++) { - this->at(idx).reset(new io_data_t(*src.at(idx))); + this->at(idx) = src.at(idx); } } diff --git a/io.h b/io.h index 6e4d9904b..af6f71bba 100644 --- a/io.h +++ b/io.h @@ -107,17 +107,6 @@ public: { } - io_data_t(const io_data_t &rhs) : - out_buffer(rhs.out_buffer), - io_mode(rhs.io_mode), - fd(rhs.fd), - param1(rhs.param1), - param2(rhs.param2), - filename_cstr(rhs.filename_cstr ? strdup(rhs.filename_cstr) : NULL), - is_input(rhs.is_input) - { - } - ~io_data_t() { free((void *)filename_cstr);