aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/command.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-04 05:27:35 +0100
committereldritch horrors <pennae@lix.systems>2024-03-04 05:27:35 +0100
commit6e0dd9f6738f58749a9fe31cd0dfcf9fc10cdcfe (patch)
tree043b0ebc2c2f4bb6fe6d19e4c84ca8bef417c0a3 /src/libcmd/command.cc
parent2633ca3f883bb5f1bba7eb8a310cdf401680fe3b (diff)
Merge pull request #9289 from edolstra/fix-warnings
Fix gcc warnings (cherry picked from commit 66cb364f581486e0c426b35149ac13d19f7842bc) Change-Id: I1474dbc18a4beaaf1bce16d4abbcc99806b79ff1
Diffstat (limited to 'src/libcmd/command.cc')
-rw-r--r--src/libcmd/command.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc
index a88ba8134..de9f546fc 100644
--- a/src/libcmd/command.cc
+++ b/src/libcmd/command.cc
@@ -175,7 +175,7 @@ void BuiltPathsCommand::run(ref<Store> store, Installables && installables)
throw UsageError("'--all' does not expect arguments");
// XXX: Only uses opaque paths, ignores all the realisations
for (auto & p : store->queryAllValidPaths())
- paths.push_back(BuiltPath::Opaque{p});
+ paths.emplace_back(BuiltPath::Opaque{p});
} else {
paths = Installable::toBuiltPaths(getEvalStore(), store, realiseMode, operateOn, installables);
if (recursive) {
@@ -188,7 +188,7 @@ void BuiltPathsCommand::run(ref<Store> store, Installables && installables)
}
store->computeFSClosure(pathsRoots, pathsClosure);
for (auto & path : pathsClosure)
- paths.push_back(BuiltPath::Opaque{path});
+ paths.emplace_back(BuiltPath::Opaque{path});
}
}