diff options
author | David Kalnischkies <david@kalnischkies.de> | 2022-03-20 15:08:18 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2022-03-21 02:57:34 +0100 |
commit | a0e16ddd7b274bf6b1383873315020f215e6f67a (patch) | |
tree | 1a6fd92225ea093aa752431ef54843fe49876233 | |
parent | 4dd5e241af25eeac5d1b6b61b73aa73614130d7c (diff) |
Avoid using unqualified make_pair potentially triggering ftbfs
If the includes are slightly changed, we end with an error here:
apt/apt-pkg/depcache.cc:2059:31: error: ‘make_pair’ was not declared in this scope; did you mean ‘std::make_pair’?
Yes, we mean std::make_pair, but we can avoid the explicit call
altogether by using emplace_back instead of push_back.
-rw-r--r-- | apt-pkg/depcache.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/depcache.cc b/apt-pkg/depcache.cc index 76c779430..f7d9832a0 100644 --- a/apt-pkg/depcache.cc +++ b/apt-pkg/depcache.cc @@ -2056,7 +2056,7 @@ bool pkgDepCache::SetCandidateRelease(pkgCache::VerIterator TargetVer, if (itsFine == false) { // change the candidate - Changed.push_back(make_pair(V, TargetVer)); + Changed.emplace_back(V, TargetVer); if (SetCandidateRelease(V, TargetRel, Changed) == false) { if (stillOr == false) |