Commit b8a79224 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

tgbasafracomplement: avoid some std::set copies

* src/tgba/ 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++.
parent ad8d2422
......@@ -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(, nodes(other.nodes)
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);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment