diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index b787ac2f2..9a6c920f7 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -827,7 +827,7 @@ void Store::substitutePaths(const StorePathSet & paths) if (!willSubstitute.empty()) try { std::vector subs; - for (auto & p : willSubstitute) subs.push_back(DerivedPath::Opaque{p}); + for (auto & p : willSubstitute) subs.emplace_back(DerivedPath::Opaque{p}); buildPaths(subs); } catch (Error & e) { logWarning(e.info());