* Wrapper template for making GiNaC classes out of STL containers. */
/*
- * GiNaC Copyright (C) 1999-2006 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
{
setflag(get_default_flags());
- for (unsigned int i=0; true; i++) {
+ archive_node::archive_node_cit first = n.find_first("seq");
+ archive_node::archive_node_cit last = n.find_last("seq");
+ ++last;
+ reserve(this->seq, last - first);
+ for (archive_node::archive_node_cit i=first; i<last; ++i) {
ex e;
- if (n.find_ex("seq", e, sym_lst, i))
- this->seq.push_back(e);
- else
- break;
+ n.find_ex_by_loc(i, e, sym_lst);
+ this->seq.push_back(e);
}
}