diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-11 13:22:16 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-12 15:43:37 +0200 |
commit | 1e1758e8c30d30df0ebeefbada1e5a8f74d8a350 (patch) | |
tree | b5b87ab3d7b61a0dc0e89e14e28af78293c4a423 /src/buildtool/execution_engine/dag/dag.cpp | |
parent | 9362f6c426a6e10d0f77282364a0061ebf192375 (diff) | |
download | justbuild-1e1758e8c30d30df0ebeefbada1e5a8f74d8a350.tar.gz |
Use static Create functions to construct ArtifactDescription
...instead of unobvious ctors relying on overload resolution.
Diffstat (limited to 'src/buildtool/execution_engine/dag/dag.cpp')
-rw-r--r-- | src/buildtool/execution_engine/dag/dag.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/buildtool/execution_engine/dag/dag.cpp b/src/buildtool/execution_engine/dag/dag.cpp index a3c25402..c36ec664 100644 --- a/src/buildtool/execution_engine/dag/dag.cpp +++ b/src/buildtool/execution_engine/dag/dag.cpp @@ -22,7 +22,7 @@ auto DependencyGraph::CreateOutputArtifactNodes( -> std::pair<std::vector<DependencyGraph::NamedArtifactNodePtr>, std::vector<DependencyGraph::NamedArtifactNodePtr>> { if (is_tree_action) { // create tree artifact - auto artifact = ArtifactDescription{action_id}.ToArtifact(); + auto artifact = ArtifactDescription::CreateTree(action_id).ToArtifact(); auto const node_id = AddArtifact(std::move(artifact)); return std::make_pair(std::vector<NamedArtifactNodePtr>{}, std::vector<NamedArtifactNodePtr>{ @@ -32,10 +32,9 @@ auto DependencyGraph::CreateOutputArtifactNodes( // create action artifacts auto node_creator = [this, &action_id](auto* nodes, auto const& paths) { for (auto const& artifact_path : paths) { - auto artifact = - ArtifactDescription{action_id, - std::filesystem::path{artifact_path}} - .ToArtifact(); + auto artifact = ArtifactDescription::CreateAction( + action_id, std::filesystem::path{artifact_path}) + .ToArtifact(); auto const node_id = AddArtifact(std::move(artifact)); nodes->emplace_back(NamedArtifactNodePtr{ artifact_path, &(*artifact_nodes_[node_id])}); |