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/local/local_response.hpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/buildtool/execution_api/local/local_response.hpp') diff --git a/src/buildtool/execution_api/local/local_response.hpp b/src/buildtool/execution_api/local/local_response.hpp index 2875ec16..7faa5619 100644 --- a/src/buildtool/execution_api/local/local_response.hpp +++ b/src/buildtool/execution_api/local/local_response.hpp @@ -76,10 +76,10 @@ class LocalResponse final : public IExecutionResponse { try { artifacts.emplace( file.path(), - Artifact::ObjectInfo{ArtifactDigest{file.digest()}, - file.is_executable() - ? ObjectType::Executable - : ObjectType::File}); + Artifact::ObjectInfo{ + .digest = ArtifactDigest{file.digest()}, + .type = file.is_executable() ? ObjectType::Executable + : ObjectType::File}); } catch (...) { return {}; } @@ -90,8 +90,9 @@ class LocalResponse final : public IExecutionResponse { try { artifacts.emplace( dir.path(), - Artifact::ObjectInfo{ArtifactDigest{dir.tree_digest()}, - ObjectType::Tree}); + Artifact::ObjectInfo{ + .digest = ArtifactDigest{dir.tree_digest()}, + .type = ObjectType::Tree}); } catch (...) { return {}; } -- cgit v1.2.3