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

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2011, 2012, 2013 Laboratoire de Recherche et
// Copyright (C) 2011, 2012, 2013, 2014 Laboratoire de Recherche et
// Développement de l'Epita (LRDE)
//
// This file is part of Spot, a model checking library.
@ -121,8 +121,7 @@ strident "," condition "," follow_list ";"
here.begin.column + i->first.end.column;
here.begin.line += i->first.begin.line - 1;
here.begin.column += i->first.begin.column;
error_list.push_back(spot::kripke_parse_error(here,
i->second));
error_list.emplace_back(here, i->second);
}
if (f)
result->add_condition(f, *$1);
@ -154,8 +153,7 @@ string: STRING
| UNTERMINATED_STRING
{
$$ = $1;
error_list.push_back(spot::kripke_parse_error(@1,
"unterminated string"));
error_list.emplace_back(@1, "unterminated string");
}
;
@ -192,7 +190,7 @@ void
kripkeyy::parser::error(const location_type& location,
const std::string& message)
{
error_list.push_back(spot::kripke_parse_error(location, message));
error_list.emplace_back(location, message);
}
namespace spot