tgbasafracomplement: avoid some std::set copies
* src/tgba/tgbasafracomplement.cc: Here. Beside being more efficient, the use of std::swap instead of an assignment also protects us from a bug recently introduced in the development version of G++. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63698
This commit is contained in:
parent
ad8d24222a
commit
b8a792248a
1 changed files with 2 additions and 4 deletions
|
|
@ -147,11 +147,9 @@ namespace spot
|
|||
|
||||
/// \brief Copy the tree \a other, and set \c marked to false.
|
||||
safra_tree::safra_tree(const safra_tree& other)
|
||||
: marked(false)
|
||||
: marked(false), name(other.name), nodes(other.nodes)
|
||||
{
|
||||
name = other.name;
|
||||
parent = 0;
|
||||
nodes = other.nodes;
|
||||
for (auto i: other.children)
|
||||
{
|
||||
safra_tree* c = new safra_tree(*i);
|
||||
|
|
@ -365,7 +363,7 @@ namespace spot
|
|||
}
|
||||
}
|
||||
}
|
||||
nodes = new_subset;
|
||||
std::swap(nodes, new_subset);
|
||||
|
||||
for (auto c: children)
|
||||
c->succ_create(condition, cache_transition);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue