Use emplace() for associative containers.
* HACKING: Adjust requirements. g++4.8 is now OK for all our targets. * iface/dve2/dve2.cc, src/dstarparse/dstarparse.yy src/dstarparse/nsa2tgba.cc, src/graph/ngraph.hh, src/ltlast/atomic_prop.cc, src/ltlast/binop.cc, src/ltlast/bunop.cc, src/ltlast/multop.cc, src/ltlast/unop.cc, src/ltlvisit/mark.cc, src/ltlvisit/relabel.cc, src/taalgos/emptinessta.cc, src/taalgos/tgba2ta.cc, src/tgba/tgbaexplicit.hh, src/tgba/tgbagraph.hh, src/tgba/tgbasafracomplement.cc, src/tgba/tgbatba.cc, src/tgbaalgos/cycles.cc, src/tgbaalgos/degen.cc, src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc, src/tgbaalgos/emptiness.cc, src/tgbaalgos/gtec/gtec.cc, src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/magic.cc, src/tgbaalgos/ndfs_result.hxx, src/tgbaalgos/reachiter.cc, src/tgbaalgos/scc.cc, src/tgbaalgos/sccfilter.cc, src/tgbaalgos/se05.cc, src/tgbaalgos/simulation.cc, src/tgbaalgos/tau03.cc, src/tgbaalgos/tau03opt.cc, src/tgbaalgos/weight.cc: Use emplace() instead of insert(make_pair(...)) or insert(...::value_type(...)).
This commit is contained in:
parent
1eaaf8832a
commit
fd5fbda4dd
35 changed files with 77 additions and 104 deletions
|
|
@ -91,7 +91,7 @@ namespace spot
|
|||
atomic_prop::instance(const std::string& name, environment& env)
|
||||
{
|
||||
const atomic_prop* ap;
|
||||
auto ires = instances.insert(std::make_pair(key(name, &env), nullptr));
|
||||
auto ires = instances.emplace(key(name, &env), nullptr);
|
||||
if (!ires.second)
|
||||
ap = ires.first->second;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -504,8 +504,7 @@ namespace spot
|
|||
}
|
||||
|
||||
const binop* res;
|
||||
auto ires = instances.insert(std::make_pair(key(op, first, second),
|
||||
nullptr));
|
||||
auto ires = instances.emplace(key(op, first, second), nullptr);
|
||||
if (!ires.second)
|
||||
{
|
||||
// This instance already exists.
|
||||
|
|
|
|||
|
|
@ -237,8 +237,7 @@ namespace spot
|
|||
}
|
||||
|
||||
const formula* res;
|
||||
auto ires = instances.insert(std::make_pair(key(op, child, min, max),
|
||||
nullptr));
|
||||
auto ires = instances.emplace(key(op, child, min, max), nullptr);
|
||||
if (!ires.second)
|
||||
{
|
||||
// This instance already exists.
|
||||
|
|
|
|||
|
|
@ -595,7 +595,7 @@ namespace spot
|
|||
const multop* res;
|
||||
// Insert the key with the dummy nullptr just
|
||||
// to check if p already exists.
|
||||
auto ires = instances.insert(std::make_pair(key(op, v), nullptr));
|
||||
auto ires = instances.emplace(key(op, v), nullptr);
|
||||
if (!ires.second)
|
||||
{
|
||||
// The instance did already exists. Free v.
|
||||
|
|
|
|||
|
|
@ -300,7 +300,7 @@ namespace spot
|
|||
}
|
||||
|
||||
const unop* res;
|
||||
auto ires = instances.insert(std::make_pair(key(op, child), nullptr));
|
||||
auto ires = instances.emplace(key(op, child), nullptr);
|
||||
if (!ires.second)
|
||||
{
|
||||
// This instance already exists.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue