work around spurious GCC 13 warnings
* spot/graph/graph.hh (new_univ_dests): Add an overload taking a temporary vector. * spot/twa/twagraph.cc (defrag_states): Use it. * tests/core/parity.cc: Remove some temporary variables.
This commit is contained in:
parent
3b59240133
commit
06b1ecb50b
3 changed files with 19 additions and 13 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2014-2018, 2020-2022 Laboratoire de Recherche et
|
||||
// Copyright (C) 2014-2018, 2020-2023 Laboratoire de Recherche et
|
||||
// Développement de l'Epita.
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -576,6 +576,15 @@ namespace spot
|
|||
return p.first->second;
|
||||
}
|
||||
|
||||
unsigned new_univ_dests(std::vector<unsigned>&& tmp)
|
||||
{
|
||||
std::sort(tmp.begin(), tmp.end());
|
||||
tmp.erase(std::unique(tmp.begin(), tmp.end()), tmp.end());
|
||||
auto p = uniq_.emplace(tmp, 0);
|
||||
if (p.second)
|
||||
p.first->second = g_.new_univ_dests(tmp.begin(), tmp.end());
|
||||
return p.first->second;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2014-2022 Laboratoire de Recherche et Développement
|
||||
// Copyright (C) 2014-2023 Laboratoire de Recherche et Développement
|
||||
// de l'Epita.
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -1243,8 +1243,7 @@ namespace spot
|
|||
// the state so that graph::degrag_states() will
|
||||
// eventually update it to the correct value.
|
||||
nd = newst.size();
|
||||
newst.emplace_back(uniq.new_univ_dests(tmp.begin(),
|
||||
tmp.end()));
|
||||
newst.emplace_back(uniq.new_univ_dests(std::move(tmp)));
|
||||
}
|
||||
}
|
||||
in_dst = nd;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue