aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéophane Hufschmitt <regnat@users.noreply.github.com>2021-02-25 17:10:45 +0100
committerregnat <rg@regnat.ovh>2021-02-25 17:21:51 +0100
commitc182aac98ab6548c16b6686638591ba5b034026a (patch)
treec08e1ff12403e0026c55a98f4e3db62f0e9a4431
parent3b76f8f252c12fbeb49aa2f6f695b4622e9fcc5d (diff)
Apply @edolstra stylistic suggestions
Mostly removing useless comments and adding spaces before `&` Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
-rw-r--r--src/libstore/globals.hh1
-rw-r--r--src/libstore/store-api.cc6
-rw-r--r--src/libstore/store-api.hh2
3 files changed, 4 insertions, 5 deletions
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
index 25351f55c..a51d9c2f1 100644
--- a/src/libstore/globals.hh
+++ b/src/libstore/globals.hh
@@ -45,7 +45,6 @@ struct PluginFilesSetting : public BaseSetting<Paths>
void set(const std::string & str, bool append = false) override;
};
-/* MakeError(MissingExperimentalFeature, Error); */
class MissingExperimentalFeature: public Error
{
public:
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index db84ec7a2..b7a3f7b11 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -789,19 +789,19 @@ std::map<StorePath, StorePath> copyPaths(ref<Store> srcStore, ref<Store> dstStor
settings.requireExperimentalFeature("ca-derivations");
StorePathSet storePaths;
std::set<Realisation> realisations;
- for (auto path : paths) {
+ for (auto & path : paths) {
storePaths.insert(path.path());
if (auto realisation = std::get_if<Realisation>(&path.raw))
realisations.insert(*realisation);
}
auto pathsMap = copyPaths(srcStore, dstStore, storePaths, repair, checkSigs, substitute);
try {
- for (auto& realisation : realisations) {
+ for (auto & realisation : realisations) {
dstStore->registerDrvOutput(realisation);
}
} catch (MissingExperimentalFeature & e) {
// Don't fail if the remote doesn't support CA derivations is it might
- // not be whithin our control to change that, and we might still want
+ // not be within our control to change that, and we might still want
// to at least copy the output paths.
if (e.missingFeature == "ca-derivations")
ignoreException();
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh
index 63b26422a..742cd18db 100644
--- a/src/libstore/store-api.hh
+++ b/src/libstore/store-api.hh
@@ -752,7 +752,7 @@ void copyStorePath(ref<Store> srcStore, ref<Store> dstStore,
that. Returns a map of what each path was copied to the dstStore
as. */
std::map<StorePath, StorePath> copyPaths(ref<Store> srcStore, ref<Store> dstStore,
- const RealisedPath::Set&,
+ const RealisedPath::Set &,
RepairFlag repair = NoRepair,
CheckSigsFlag checkSigs = CheckSigs,
SubstituteFlag substitute = NoSubstitute);