diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-05-26 15:06:49 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-06-06 09:55:17 +0200 |
commit | 3f41feb6e022a30cfce39ec40c7ffda46d75193d (patch) | |
tree | 24f8f8d5047582bd936b17d96e3f7b4b14020c79 /src/buildtool/main/main.cpp | |
parent | e4214ea95874bdd5bc059d0892f90c09df7b664d (diff) | |
download | justbuild-3f41feb6e022a30cfce39ec40c7ffda46d75193d.tar.gz |
style: Use designated initializers
This feature has been introduced with C++20.
Diffstat (limited to 'src/buildtool/main/main.cpp')
-rw-r--r-- | src/buildtool/main/main.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp index 498507b1..3dee0096 100644 --- a/src/buildtool/main/main.cpp +++ b/src/buildtool/main/main.cpp @@ -576,7 +576,8 @@ void SetupHashFunction() { if (not entity) { std::exit(kExitFailure); } - return Target::ConfiguredTarget{std::move(*entity), std::move(config)}; + return Target::ConfiguredTarget{.target = std::move(*entity), + .config = std::move(config)}; } auto const target_file = (std::filesystem::path{current_module} / target_file_name).string(); @@ -608,9 +609,9 @@ void SetupHashFunction() { std::exit(kExitFailure); } return Target::ConfiguredTarget{ - Base::EntityName{ - Base::NamedTarget{main_repo, current_module, json.begin().key()}}, - std::move(config)}; + .target = Base::EntityName{Base::NamedTarget{ + main_repo, current_module, json.begin().key()}}, + .config = std::move(config)}; } [[nodiscard]] auto DetermineWorkspaceRootByLookingForMarkers() noexcept |