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/storage/target_cache_entry.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/buildtool/storage/target_cache_entry.cpp') diff --git a/src/buildtool/storage/target_cache_entry.cpp b/src/buildtool/storage/target_cache_entry.cpp index 6e1f3187..e06d0caa 100644 --- a/src/buildtool/storage/target_cache_entry.cpp +++ b/src/buildtool/storage/target_cache_entry.cpp @@ -26,8 +26,9 @@ auto TargetCacheEntry::FromTarget( AnalysedTargetPtr const& target, std::unordered_map const& replacements) noexcept -> std::optional { - auto result = TargetResult{ - target->Artifacts(), target->Provides(), target->RunFiles()}; + auto result = TargetResult{.artifact_stage = target->Artifacts(), + .provides = target->Provides(), + .runfiles = target->RunFiles()}; if (auto desc = result.ReplaceNonKnownAndToJson(replacements)) { return TargetCacheEntry{*desc}; } -- cgit v1.2.3