From 53bc8ff152091173e11f2bead245541e3037d769 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Wed, 3 Jun 2020 20:35:14 -0400 Subject: [PATCH] No C++ designated initializers yet with Clang 7 --- src/libfetchers/tarball.cc | 4 ++-- src/libstore/build.cc | 5 +---- src/libstore/local-store.cc | 5 +---- src/nix/add-to-store.cc | 4 ++-- src/nix/make-content-addressable.cc | 4 ++-- 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/libfetchers/tarball.cc b/src/libfetchers/tarball.cc index e8e5231d2..f8813ea1a 100644 --- a/src/libfetchers/tarball.cc +++ b/src/libfetchers/tarball.cc @@ -71,8 +71,8 @@ DownloadFileResult downloadFile( info.narHash = hashString(HashType::SHA256, *sink.s); info.narSize = sink.s->size(); info.ca = FileSystemHash { - .method = FileIngestionMethod::Flat, - .hash = hash, + FileIngestionMethod::Flat, + hash, }; auto source = StringSource { *sink.s }; store->addToStore(info, source, NoRepair, NoCheckSigs); diff --git a/src/libstore/build.cc b/src/libstore/build.cc index ea7319150..3eb103e94 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -3757,10 +3757,7 @@ void DerivationGoal::registerOutputs() else assert(worker.store.parseStorePath(path) == dest); - ca = FileSystemHash { - .method = i.second.hash->method, - .hash = h2, - }; + ca = FileSystemHash { i.second.hash->method, h2 }; } /* Get rid of all weird permissions. This also checks that diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index 5f0053753..af6c6f390 100644 --- a/src/libstore/local-store.cc +++ b/src/libstore/local-store.cc @@ -1093,10 +1093,7 @@ StorePath LocalStore::addToStoreFromDump(const string & dump, const string & nam ValidPathInfo info(dstPath.clone()); info.narHash = hash.first; info.narSize = hash.second; - info.ca = FileSystemHash { - .method = method, - .hash = h, - }; + info.ca = FileSystemHash { method, h }; registerValidPath(info); } diff --git a/src/nix/add-to-store.cc b/src/nix/add-to-store.cc index b92597cc2..3162e0c62 100644 --- a/src/nix/add-to-store.cc +++ b/src/nix/add-to-store.cc @@ -49,8 +49,8 @@ struct CmdAddToStore : MixDryRun, StoreCommand info.narHash = narHash; info.narSize = sink.s->size(); *info.ca = FileSystemHash { - .method = FileIngestionMethod::Recursive, - .hash = info.narHash + FileIngestionMethod::Recursive, + info.narHash, }; if (!dryRun) { diff --git a/src/nix/make-content-addressable.cc b/src/nix/make-content-addressable.cc index 5003ff459..d19e681bd 100644 --- a/src/nix/make-content-addressable.cc +++ b/src/nix/make-content-addressable.cc @@ -83,8 +83,8 @@ struct CmdMakeContentAddressable : StorePathsCommand, MixJSON info.narHash = narHash; info.narSize = sink.s->size(); info.ca = FileSystemHash { - .method = FileIngestionMethod::Recursive, - .hash = info.narHash, + FileIngestionMethod::Recursive, + info.narHash, }; if (!json)