summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/remote/bazel/bazel_response.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-05-26 15:06:49 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-06-06 09:55:17 +0200
commit3f41feb6e022a30cfce39ec40c7ffda46d75193d (patch)
tree24f8f8d5047582bd936b17d96e3f7b4b14020c79 /src/buildtool/execution_api/remote/bazel/bazel_response.cpp
parente4214ea95874bdd5bc059d0892f90c09df7b664d (diff)
downloadjustbuild-3f41feb6e022a30cfce39ec40c7ffda46d75193d.tar.gz
style: Use designated initializers
This feature has been introduced with C++20.
Diffstat (limited to 'src/buildtool/execution_api/remote/bazel/bazel_response.cpp')
-rw-r--r--src/buildtool/execution_api/remote/bazel/bazel_response.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/buildtool/execution_api/remote/bazel/bazel_response.cpp b/src/buildtool/execution_api/remote/bazel/bazel_response.cpp
index d45d9aa1..9889d8ed 100644
--- a/src/buildtool/execution_api/remote/bazel/bazel_response.cpp
+++ b/src/buildtool/execution_api/remote/bazel/bazel_response.cpp
@@ -51,11 +51,12 @@ auto BazelResponse::Artifacts() const noexcept -> ArtifactInfos {
// collect files and store them
for (auto const& file : action_result.output_files()) {
try {
- artifacts.emplace(file.path(),
- Artifact::ObjectInfo{
- ArtifactDigest{file.digest()},
- file.is_executable() ? ObjectType::Executable
- : ObjectType::File});
+ artifacts.emplace(
+ file.path(),
+ Artifact::ObjectInfo{.digest = ArtifactDigest{file.digest()},
+ .type = file.is_executable()
+ ? ObjectType::Executable
+ : ObjectType::File});
} catch (...) {
return {};
}
@@ -68,8 +69,9 @@ auto BazelResponse::Artifacts() const noexcept -> ArtifactInfos {
try {
artifacts.emplace(
tree.path(),
- Artifact::ObjectInfo{ArtifactDigest{tree.tree_digest()},
- ObjectType::Tree});
+ Artifact::ObjectInfo{
+ .digest = ArtifactDigest{tree.tree_digest()},
+ .type = ObjectType::Tree});
} catch (...) {
return {};
}
@@ -109,7 +111,8 @@ auto BazelResponse::Artifacts() const noexcept -> ArtifactInfos {
}
artifacts.emplace(
action_result.output_directories(pos).path(),
- Artifact::ObjectInfo{*root_digest, ObjectType::Tree});
+ Artifact::ObjectInfo{.digest = *root_digest,
+ .type = ObjectType::Tree});
} catch (...) {
return {};
}