summaryrefslogtreecommitdiff
path: root/apt-private/private-install.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-private/private-install.cc')
-rw-r--r--apt-private/private-install.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc
index a5a88c99d..af6697d7f 100644
--- a/apt-private/private-install.cc
+++ b/apt-private/private-install.cc
@@ -727,8 +727,7 @@ bool AddVolatileSourceFile(pkgSourceList *const SL, PseudoPkg &&pkg, std::vector
return false;
std::vector<std::string> files;
SL->AddVolatileFile(pkg.name, &files);
- for (auto &&f: files)
- VolatileCmdL.emplace_back(std::move(f), pkg.arch, pkg.release, pkg.index);
+ std::transform(files.begin(), files.end(), std::back_inserter(VolatileCmdL), [&](auto &&f) { return PseudoPkg{std::move(f), pkg.arch, pkg.release, pkg.index}; });
return true;
}
@@ -740,8 +739,7 @@ bool AddVolatileBinaryFile(pkgSourceList *const SL, PseudoPkg &&pkg, std::vector
return false;
std::vector<std::string> files;
SL->AddVolatileFile(pkg.name, &files);
- for (auto &&f: files)
- VolatileCmdL.emplace_back(std::move(f), pkg.arch, pkg.release, pkg.index);
+ std::transform(files.begin(), files.end(), std::back_inserter(VolatileCmdL), [&](auto &&f) { return PseudoPkg{std::move(f), pkg.arch, pkg.release, pkg.index}; });
return true;
}
/*}}}*/