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,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2012, 2013, 2014 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -56,10 +56,10 @@ parse_opt_finput(int key, char* arg, struct argp_state*)
switch (key)
{
case 'f':
jobs.push_back(job(arg, false));
jobs.emplace_back(arg, false);
break;
case 'F':
jobs.push_back(job(arg, true));
jobs.emplace_back(arg, true);
break;
case OPT_LBT:
lbt_input = true;

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2013 Laboratoire de Recherche et Développement de
// Copyright (C) 2013, 2014 Laboratoire de Recherche et Développement de
// l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
@ -140,7 +140,7 @@ parse_opt(int key, char* arg, struct argp_state*)
type = spot::postprocessor::BA;
break;
case 'F':
jobs.push_back(job(arg, true));
jobs.emplace_back(arg, true);
break;
case 'M':
type = spot::postprocessor::Monitor;
@ -188,7 +188,7 @@ parse_opt(int key, char* arg, struct argp_state*)
type = spot::postprocessor::TGBA;
break;
case ARGP_KEY_ARG:
jobs.push_back(job(arg, true));
jobs.emplace_back(arg, true);
break;
default:
@ -370,7 +370,7 @@ main(int argc, char** argv)
exit(err);
if (jobs.empty())
jobs.push_back(job("-", true));
jobs.emplace_back("-", true);
spot::postprocessor post(&extra_options);
post.set_pref(pref | comp);

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2012, 2013, 2014 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -186,7 +186,7 @@ parse_opt(int key, char* arg, struct argp_state*)
break;
case ARGP_KEY_ARG:
// FIXME: use stat() to distinguish filename from string?
jobs.push_back(job(arg, false));
jobs.emplace_back(arg, false);
break;
default:

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2012, 2013, 2014 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -144,7 +144,7 @@ parse_opt(int key, char* arg, struct argp_state*)
break;
case ARGP_KEY_ARG:
// FIXME: use stat() to distinguish filename from string?
jobs.push_back(job(arg, false));
jobs.emplace_back(arg, false);
break;
default:

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2012, 2013, 2014 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -1613,7 +1613,7 @@ main(int argc, char** argv)
exit(err);
if (jobs.empty())
jobs.push_back(job("-", 1));
jobs.emplace_back("-", 1);
if (translators.empty())
error(2, 0, "No translator to run? Run '%s --help' for usage.",

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2012, 2013 Laboratoire de Recherche et Développement de
// l'Epita (LRDE).
// Copyright (C) 2012, 2013, 2014 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -270,7 +270,7 @@ parse_opt(int key, char* arg, struct argp_state*)
break;
case ARGP_KEY_ARG:
// FIXME: use stat() to distinguish filename from string?
jobs.push_back(job(arg, true));
jobs.emplace_back(arg, true);
break;
case OPT_BOOLEAN:
boolean = true;
@ -598,7 +598,7 @@ main(int argc, char** argv)
exit(err);
if (jobs.empty())
jobs.push_back(job("-", 1));
jobs.emplace_back("-", 1);
// --stutter-insensitive implies --ltl
ltl |= stutter_insensitive;