Skip to content

Commit

Permalink
Revert "Remove some designated initializers"
Browse files Browse the repository at this point in the history
This reverts commit ee9eb83.
  • Loading branch information
Ericson2314 committed Feb 28, 2023
1 parent 123b11f commit 85bb865
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion perl/lib/Nix/Store.xs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ SV * makeFixedOutputPath(int recursive, char * algo, char * hash, char * name)
.method = method,
.hash = h,
},
/* .references = */ {},
.references = {},
});
XPUSHs(sv_2mortal(newSVpv(store()->printStorePath(path).c_str(), 0)));
} catch (Error & e) {
Expand Down
4 changes: 2 additions & 2 deletions src/libexpr/primops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ drvName, Bindings * attrs, Value & v)
.method = method,
.hash = h,
},
/* .references = */ {},
.references = {},
});
drv.env["out"] = state.store->printStorePath(outPath);
drv.outputs.insert_or_assign("out",
Expand Down Expand Up @@ -2103,7 +2103,7 @@ static void addPath(
.method = method,
.hash = *expectedHash,
},
/* .references = */ {},
.references = {},
});

if (!expectedHash || !state.store->isValidPath(*expectedStorePath)) {
Expand Down
2 changes: 1 addition & 1 deletion src/libexpr/primops/fetchTree.cc
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ static void fetch(EvalState & state, const PosIdx pos, Value * * args, Value & v
.method = unpack ? FileIngestionMethod::Recursive : FileIngestionMethod::Flat,
.hash = *expectedHash,
},
/* .references = */ {}
.references = {}
});

if (state.store->isValidPath(expectedPath)) {
Expand Down
2 changes: 1 addition & 1 deletion src/libfetchers/fetchers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ StorePath Input::computeStorePath(Store & store) const
.method = FileIngestionMethod::Recursive,
.hash = *narHash,
},
/* .references = */ {},
.references = {},
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/libfetchers/tarball.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ DownloadFileResult downloadFile(
.method = FileIngestionMethod::Flat,
.hash = hash,
},
/* .references = */ {},
.references = {},
},
hashString(htSHA256, sink.s),
};
Expand Down
4 changes: 2 additions & 2 deletions src/libstore/binary-cache-store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ StorePath BinaryCacheStore::addToStoreFromDump(Source & dump, std::string_view n
.method = method,
.hash = nar.first,
},
/* .references = */ {
.references = {
.others = references,
.self = false,
},
Expand Down Expand Up @@ -431,7 +431,7 @@ StorePath BinaryCacheStore::addToStore(
.method = method,
.hash = h,
},
/* .references = */ {
.references = {
.others = references,
.self = false,
},
Expand Down
2 changes: 1 addition & 1 deletion src/libstore/build/local-derivation-goal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2446,7 +2446,7 @@ DrvOutputs LocalDerivationGoal::registerOutputs()
.method = outputHash.method,
.hash = got,
},
/* .references = */ rewriteRefs(),
.references = rewriteRefs(),
},
Hash::dummy,
};
Expand Down
4 changes: 2 additions & 2 deletions src/libstore/content-address.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ ContentAddressWithReferences caWithoutRefs(const ContentAddress & ca) {
[&](const TextHash & h) -> ContentAddressWithReferences {
return TextInfo {
h,
/* .references = */ {},
.references = {},
};
},
[&](const FixedOutputHash & h) -> ContentAddressWithReferences {
return FixedOutputInfo {
h,
/* .references = */ {},
.references = {},
};
},
}, ca);
Expand Down
2 changes: 1 addition & 1 deletion src/libstore/local-store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ StorePath LocalStore::addToStoreFromDump(Source & source0, std::string_view name
.method = method,
.hash = hash,
},
/* .references = */ {
.references = {
.others = references,
.self = false,
},
Expand Down
2 changes: 1 addition & 1 deletion src/libstore/make-content-addressed.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ std::map<StorePath, StorePath> makeContentAddressed(
.method = FileIngestionMethod::Recursive,
.hash = narModuloHash,
},
/* .references = */ std::move(refs),
.references = std::move(refs),
},
Hash::dummy,
};
Expand Down
4 changes: 2 additions & 2 deletions src/libstore/path-info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ std::optional<ContentAddressWithReferences> ValidPathInfo::contentAddressWithRef
assert(references.count(path) == 0);
return TextInfo {
th,
/* .references = */ references,
.references = references,
};
},
[&](const FixedOutputHash & foh) -> ContentAddressWithReferences {
Expand All @@ -43,7 +43,7 @@ std::optional<ContentAddressWithReferences> ValidPathInfo::contentAddressWithRef
}
return FixedOutputInfo {
foh,
/* .references = */ {
.references = {
.others = std::move(refs),
.self = hasSelfReference,
},
Expand Down
4 changes: 2 additions & 2 deletions src/libstore/store-api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ std::pair<StorePath, Hash> Store::computeStorePathForPath(std::string_view name,
.method = method,
.hash = h,
},
/* .references = */ {},
.references = {},
};
return std::make_pair(makeFixedOutputPath(name, caInfo), h);
}
Expand Down Expand Up @@ -445,7 +445,7 @@ ValidPathInfo Store::addToStoreSlow(std::string_view name, const Path & srcPath,
.method = method,
.hash = hash,
},
/* .references = */ {},
.references = {},
},
narHash,
};
Expand Down
2 changes: 1 addition & 1 deletion src/nix-store/nix-store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ static void opPrintFixedPath(Strings opFlags, Strings opArgs)
.method = method,
.hash = Hash::parseAny(hash, hashAlgo),
},
/* .references = */ {},
.references = {},
})));
}

Expand Down
2 changes: 1 addition & 1 deletion src/nix/add-to-store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct CmdAddToStore : MixDryRun, StoreCommand
.method = std::move(ingestionMethod),
.hash = std::move(hash),
},
/* .references = */ {},
.references = {},
},
narHash,
};
Expand Down
2 changes: 1 addition & 1 deletion src/nix/prefetch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ std::tuple<StorePath, Hash> prefetchFile(
.method = ingestionMethod,
.hash = *expectedHash,
},
/* .references = */ {},
.references = {},
});
if (store->isValidPath(*storePath))
hash = expectedHash;
Expand Down
2 changes: 1 addition & 1 deletion src/nix/profile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ struct ProfileManifest
.method = FileIngestionMethod::Recursive,
.hash = narHash,
},
/* .references = */ {
.references = {
.others = std::move(references),
.self = false,
},
Expand Down

0 comments on commit 85bb865

Please sign in to comment.