Add a paranoid assert to io_chain_t::append

This commit is contained in:
ridiculousfish 2019-11-10 13:31:47 -08:00
parent f2093aef43
commit 424c56006d

View file

@ -215,6 +215,7 @@ void io_chain_t::push_back(shared_ptr<io_data_t> element) {
}
void io_chain_t::append(const io_chain_t &chain) {
assert(&chain != this && "Cannot append self to self");
this->insert(this->end(), chain.begin(), chain.end());
}