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
09242d3f78
commit
2745381097
1 changed files with 4 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2009, 2010, 2011, 2012, 2013 Laboratoire de Recherche
|
||||
// et Développement de l'Epita (LRDE).
|
||||
// Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Laboratoire de
|
||||
// Recherche et Développement de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -149,11 +149,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 (child_list::const_iterator i = other.children.begin();
|
||||
i != other.children.end(); ++i)
|
||||
{
|
||||
|
|
@ -376,7 +374,7 @@ namespace spot
|
|||
}
|
||||
}
|
||||
}
|
||||
nodes = new_subset;
|
||||
std::swap(nodes, new_subset);
|
||||
|
||||
for (child_list::iterator i = children.begin(); i != children.end(); ++i)
|
||||
(*i)->succ_create(condition, cache_transition);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue