Skip to content

Commit

Permalink
Manifest: installDependencies: take const ref instead
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-matsui committed Jan 7, 2025
1 parent 89a3d7d commit 636527c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Manifest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -504,14 +504,13 @@ installDependencies(const Manifest& manifest, const bool includeDevDeps) {
std::vector<DepMetadata> installed;
for (const auto& dep : manifest.dependencies) {
std::visit(
[&installed](auto&& arg) { installed.emplace_back(arg.install()); }, dep
[&](const auto& arg) { installed.emplace_back(arg.install()); }, dep
);
}
if (includeDevDeps) {
for (const auto& dep : manifest.devDependencies) {
std::visit(
[&installed](auto&& arg) { installed.emplace_back(arg.install()); },
dep
[&](const auto& arg) { installed.emplace_back(arg.install()); }, dep
);
}
}
Expand Down

0 comments on commit 636527c

Please sign in to comment.