c++11: replace push(Type(args...)) by emplace(args...)
This of course concerns push_back and push_front as well. * src/bin/common_finput.cc, src/bin/dstar2tgba.cc, src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc, src/bin/ltlcross.cc, src/bin/ltlfilt.cc, src/dstarparse/dstarparse.yy, src/kripkeparse/kripkeparse.yy, src/ltlast/formula.cc, src/ltlparse/ltlparse.yy, src/misc/minato.cc, src/neverparse/neverclaimparse.yy, src/priv/bddalloc.cc, src/ta/ta.cc, src/taalgos/emptinessta.cc, src/tgba/taatgba.cc, src/tgbaalgos/gtec/gtec.cc, src/tgbaalgos/gtec/sccstack.cc, src/tgbaalgos/magic.cc, src/tgbaalgos/ndfs_result.hxx, src/tgbaalgos/rundotdec.cc, src/tgbaalgos/scc.cc, src/tgbaalgos/se05.cc, src/tgbaalgos/simulation.cc, src/tgbaalgos/tau03.cc, src/tgbaalgos/tau03opt.cc, src/tgbaparse/tgbaparse.yy: Use emplace to make the code less verbose and avoid creating temporaries.
This commit is contained in:
parent
e0bbc2655d
commit
49c66c6319
27 changed files with 189 additions and 202 deletions
|
|
@ -206,9 +206,8 @@ namespace spot
|
|||
}
|
||||
|
||||
bounds_t bounds;
|
||||
for (taa_tgba::state_set::const_iterator i = s->begin();
|
||||
i != s->end(); ++i)
|
||||
bounds.push_back(std::make_pair((*i)->begin(), (*i)->end()));
|
||||
for (auto& i: *s)
|
||||
bounds.emplace_back(i->begin(), i->end());
|
||||
|
||||
/// Sorting might make the cartesian product faster by not
|
||||
/// exploring all possibilities.
|
||||
|
|
@ -216,8 +215,8 @@ namespace spot
|
|||
|
||||
std::vector<iterator> pos;
|
||||
pos.reserve(bounds.size());
|
||||
for (bounds_t::const_iterator i = bounds.begin(); i != bounds.end(); ++i)
|
||||
pos.push_back(i->first);
|
||||
for (auto i: bounds)
|
||||
pos.push_back(i.first);
|
||||
|
||||
while (pos[0] != bounds[0].second)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue