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:
Alexandre Duret-Lutz 2014-01-28 23:33:07 +01:00
parent e0bbc2655d
commit 49c66c6319
27 changed files with 189 additions and 202 deletions

View file

@ -173,7 +173,7 @@ namespace spot
arc.push(bddfalse);
tgba_succ_iterator* iter = ecs_->aut->succ_iter(init);
iter->first();
todo.push(pair_state_iter(init, iter));
todo.emplace(init, iter);
inc_depth();
}
@ -242,7 +242,7 @@ namespace spot
arc.push(acc);
tgba_succ_iterator* iter = ecs_->aut->succ_iter(dest);
iter->first();
todo.push(pair_state_iter(dest, iter));
todo.emplace(dest, iter);
inc_depth();
continue;
}
@ -329,8 +329,8 @@ namespace spot
{
for (auto iter: shy->ecs_->aut->succ(s))
{
q.push_back(successor(iter->current_acceptance_conditions(),
iter->current_state()));
q.emplace_back(iter->current_acceptance_conditions(),
iter->current_state());
shy->inc_depth();
shy->inc_transitions();
}
@ -351,7 +351,7 @@ namespace spot
const state* i = ecs_->aut->get_init_state();
ecs_->h->insert(i, ++num);
ecs_->root.push(num);
todo.push_back(todo_item(i, num, this));
todo.emplace_back(i, num, this);
inc_depth(1);
}
@ -510,7 +510,7 @@ namespace spot
ecs_->h->insert(succ.s, ++num);
ecs_->root.push(num);
arc.push(succ.acc);
todo.push_back(todo_item(succ.s, num, this));
todo.emplace_back(succ.s, num, this);
pos = todo.back().q.begin();
inc_depth();
continue;