From 3f41feb6e022a30cfce39ec40c7ffda46d75193d Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Fri, 26 May 2023 15:06:49 +0200 Subject: style: Use designated initializers This feature has been introduced with C++20. --- src/buildtool/execution_api/git/git_api.hpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/buildtool/execution_api/git/git_api.hpp') diff --git a/src/buildtool/execution_api/git/git_api.hpp b/src/buildtool/execution_api/git/git_api.hpp index 2844d492..acbab788 100644 --- a/src/buildtool/execution_api/git/git_api.hpp +++ b/src/buildtool/execution_api/git/git_api.hpp @@ -59,10 +59,11 @@ class GitApi final : public IExecutionApi { for (auto const& [path, entry] : *tree) { if (not RetrieveToPaths( {Artifact::ObjectInfo{ - ArtifactDigest{ - entry->Hash(), /*size*/ 0, entry->IsTree()}, - entry->Type(), - false}}, + .digest = ArtifactDigest{entry->Hash(), + /*size*/ 0, + entry->IsTree()}, + .type = entry->Type(), + .failed = false}}, {output_paths[i] / path})) { return false; } @@ -111,10 +112,11 @@ class GitApi final : public IExecutionApi { for (auto const& [path, entry] : *tree) { json[path] = Artifact::ObjectInfo{ - ArtifactDigest{ - entry->Hash(), /*size*/ 0, entry->IsTree()}, - entry->Type(), - false} + .digest = + ArtifactDigest{ + entry->Hash(), /*size*/ 0, entry->IsTree()}, + .type = entry->Type(), + .failed = false} .ToString(/*size_unknown*/ true); } auto msg = json.dump(2) + "\n"; -- cgit v1.2.3