From a0e16ddd7b274bf6b1383873315020f215e6f67a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sun, 20 Mar 2022 15:08:18 +0100 Subject: Avoid using unqualified make_pair potentially triggering ftbfs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- apt-pkg/depcache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg/depcache.cc') 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) -- cgit v1.2.3-70-g09d2