From ef70431f02e2ec13ecedab7ac342574e52d1877b Mon Sep 17 00:00:00 2001 From: Herman Semenoff Date: Wed, 8 Apr 2026 11:51:08 +0300 Subject: apt: push to emplace C++11 if possible References: - https://www.reddit.com/r/cpp_questions/comments/pm63yx/why_clangtidy_says_use_emplace_back_instead_of/ - https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-emplace.html --- apt-private/private-install.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apt-private/private-install.cc') diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index 33c529712..7b3e6eee2 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -860,10 +860,10 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vectorMarkAndSweep(); std::list mods; - mods.push_back(APT::VersionSet::Modifier(MOD_INSTALL, "+", - APT::VersionSet::Modifier::POSTFIX, APT::CacheSetHelper::CANDIDATE)); - mods.push_back(APT::VersionSet::Modifier(MOD_REMOVE, "-", - APT::VersionSet::Modifier::POSTFIX, APT::CacheSetHelper::NEWEST)); + mods.emplace_back(MOD_INSTALL, "+", + APT::VersionSet::Modifier::POSTFIX, APT::CacheSetHelper::CANDIDATE); + mods.emplace_back(MOD_REMOVE, "-", + APT::VersionSet::Modifier::POSTFIX, APT::CacheSetHelper::NEWEST); CacheSetHelperAPTGet helper(c0out); verset = APT::VersionVector::GroupedFromCommandLine(Cache, CmdL.FileList + 1, mods, fallback, helper); -- cgit v1.2.3-70-g09d2