mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-03 16:48:45 +00:00
Add a paranoid assert to io_chain_t::append
This commit is contained in:
parent
f2093aef43
commit
424c56006d
1 changed files with 1 additions and 0 deletions
|
@ -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) {
|
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());
|
this->insert(this->end(), chain.begin(), chain.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue